Hi, VA implemented this behavior in the latest releases for Seaside compatibility and their implementation behaves similar to Pharo one. I think that conceptually both methods must return true, but that's my opinion. If we can get to a consensus I can make the necessary changes. So please comment on this!. Thanks, Gabriel On Thu, Mar 4, 2010 at 10:40 AM, Julian Fitzell <jfitzell@gmail.com> wrote:
I'm not sure, but in ANSI, indexOfSubcollection:startingAt: is defined as returning 0 (no match) for an empty collection.
This doesn't necessarily mean that #beginsWith: needs to return false as well, of course, but it would be another data point. And I just checked VW and it returns true for both #beginsWith: and #endsWith: in this case so that may be an argument the other way (haven't checked Gnu or VA - not sure if they even implement it).
Julian
2010/3/4 Gabriel Cotelli <g.cotelli@gmail.com>:
Hi,
I noticed that 'pharo' beginsWith: '' returns false.
Is that Ok? I expect that this returns true, because the empty string is a prefix (and suffix) of any other string. Similar behavior exhibits endsWith:.
This seems a bug to me. What do you think?
In case we acknowledge it's a bug I can post an entry in the issue tracker and tonight upload a SLICE with the fix.
Regards, Gabriel
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project