>parameters to methods and closures also passed as references to actual >objects. in order to get new, unbounded copy of variable value, you >can use "dup" method: > >a='x' >b=a.dup But this is for one deep. Consider the following (not oneliner, but at least no comment :) s='tell' # => "tell" a=[s,s] # => ["tell", "tell"] b=a.dup # => ["tell", "tell"] c=Marshal.load(Marshal.dump(a)) # => ["tell", "tell"] s[0]=?h # => 104 a # => ["hell", "hell"] b # => ["hell", "hell"] c # => ["tell", "tell"] Gergo +-[Kontra, Gergely @ Budapest University of Technology and Economics]-+ | Email: kgergely / mcl.hu, kgergely / turul.eet.bme.hu | | URL: turul.eet.bme.hu/~kgergely Mobile: (+36 20) 356 9656 | +-------"Olyan langesz vagyok, hogy poroltoval kellene jarnom!"-------+ . Magyar php mirror es magyar php dokumentacio: http://hu.php.net