I think the same happens in Java. It is a VM optimization.
Compare "Something" == "Something"� true
this is because of an optimisation
string �inside the same methods are reused.
if you want to show that string are different than symbol use two methods
returning the same strings
> _______________________________________________
On Jan 17, 2010, at 6:30 PM, laurent laffont wrote:
> Hi,
>
> Something strange to me:
>
> '2' = '2'. -> true �(OK)
> (2 asString) = (2 asString). -> true �(OK)
>
> (2 asString) == (2 asString). -> false �(OK)
> '2' == '2'. -> true �?????
>
> Laurent
> 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