Skip to content

Commit

Permalink
Fix writeFileStreamOn:do:binary: in Squeak
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrichau committed Feb 4, 2024
1 parent f20c01f commit e628eef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
as yet unclassified
files
writeFileStreamOn: aString do: aBlock binary: aBoolean
| stream |
stream := aBoolean
ifTrue: [ (MultiByteFileStream fileNamed: aString) ascii; wantsLineEndConversion: true; yourself ]
ifFalse: [ (FileStream fileNamed: aString) binary ].
ifTrue: [ (FileStream fileNamed: aString) binary ]
ifFalse: [ (MultiByteFileStream fileNamed: aString) ascii; wantsLineEndConversion: true; yourself ].
[ aBlock value: stream ]
ensure: [ stream close ]
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
as yet unclassified
files
writeFileStreamOn: aString do: aBlock binary: aBoolean
| stream |
stream := aBoolean
ifTrue: [ (MultiByteFileStream fileNamed: aString) ascii; wantsLineEndConversion: true; yourself ]
ifFalse: [ (FileStream fileNamed: aString) binary ].
ifTrue: [ (FileStream fileNamed: aString) binary ]
ifFalse: [ (MultiByteFileStream fileNamed: aString) ascii; wantsLineEndConversion: true; yourself ].
[ aBlock value: stream ]
ensure: [ stream close ]

0 comments on commit e628eef

Please sign in to comment.