PositionnableStream>>isEmpty is wrong
Ron Teitelbaum
Ron at USMedRec.com
Tue Feb 27 15:13:23 UTC 2007
All,
In my opinion that's a bug. Even reading the comments of the #isEmpty
method
isEmpty
"Answer whether the receiver's contents has no elements."
^position = 0
But try:
(ReadStream on: 'gfssfdfds') contents
Doesn't look empty to me.
More thoughts?
Ron Teitelbaum
> From: Damien Cassou
> Sent: Tuesday, February 27, 2007 6:13 AM
>
> Hi,
>
> I'm reading the ANSI Smalltalk Standard 1.9.
>
> Here is the description of #isEmpty:
> "Returns true if both the set of past and future sequence values of
> the receiver are empty. Otherwise returns false"
>
> However:
>
> (ReadStream on: 'gfssfdfds') isEmpty => true
>
> I think this is a wrong implementation.
>
> What's your opinion ?
>
> --
> Damien Cassou
>
More information about the Squeak-dev
mailing list
|