[Wtr-general] A small doubt in Ruby

Željko Filipin zeljko.filipin at gmail.com
Thu Mar 1 05:04:20 EST 2007


I think this happens because both a and b point to string "maloy". You
expected that a and b will each have it's own string.

Use

b = a.dup

instead of

b = a

and it should work.
-- 
Zeljko Filipin
zeljkofilipin.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20070301/b4e0b32b/attachment.html 


More information about the Wtr-general mailing list