[squeak-dev] The Trunk: Multilingual-nice.139.mcz
Nicolas Cellier
nicolas.cellier.aka.nice at gmail.com
Thu Mar 31 21:11:33 UTC 2011
2011/3/31 Tobias Pape <Das.Linux at gmx.de>:
> Hi,
>
> Am 2011-03-30 um 20:52 schrieb commits at source.squeak.org:
>
>> nextFromStream: aStream
>> | character1 |
>> aStream isBinary ifTrue: [^ aStream basicNext].
>> + character1 := aStream basicNext ifNil: [^ nil].
>> - character1 := aStream basicNext.
>> - character1 isNil ifTrue: [^ nil].
>> ^ self toSqueak: character1!
>
> I don't want to be a nit-picker, but would the method simply reduce to
>
>> nextFromStream: aStream
>> ^ aStream isBinary
>> ifTrue: [aStream basicNext]
>> ifFalse: [aStream basicNext
>> ifNotNil: [:character1 | self toSqueak: character1]].
>
> ?
Yes of course, case of blindness...
>
> Btw: is it #ifNotNil: or #ifNotNilDo: ?
>
> So Long
> -Tobias
>
>
It used to, but was changed to ifNotNil: which accepts either a
niladic or a unadic block since squeak 3.10
http://bugs.squeak.org/view.php?id=6426
Nicolas
More information about the Squeak-dev
mailing list
|