I think the same happens in Java. It is a VM optimization. Compare "Something" == "Something" true On Sun, Jan 17, 2010 at 6:33 PM, Stéphane Ducasse <stephane.ducasse@inria.fr
wrote:
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