Fix with-streams: if the first dispose throws an error, the second dispose never gets called
parent
e5b30b7518
commit
fb9f1de3e4
|
@ -80,7 +80,7 @@ SYMBOL: error-stream
|
||||||
|
|
||||||
: with-streams ( input output quot -- )
|
: with-streams ( input output quot -- )
|
||||||
[ [ with-streams* ] 3curry ]
|
[ [ with-streams* ] 3curry ]
|
||||||
[ [ drop dispose dispose ] 3curry ] 3bi
|
[ [ [ drop [ &dispose drop ] bi@ ] 3curry ] with-destructors ] 3bi
|
||||||
[ ] cleanup ; inline
|
[ ] cleanup ; inline
|
||||||
|
|
||||||
: print ( str -- ) output-stream get stream-print ;
|
: print ( str -- ) output-stream get stream-print ;
|
||||||
|
|
Loading…
Reference in New Issue