From: Rimantas Liubertas Date: 2009-12-29T15:49:05+09:00 Subject: Re: PLEASE HELP...dup is not working correctly in the following code > #dup creates a copy of an object with a different object_id. As > follows: <…> >> a = ["bar", "baz"] => ["bar", "baz"] >> b = a.dup => ["bar", "baz"] >> c = Marshal.load(Marshal.dump(a)) => ["bar", "baz"] >> b[0] << "s" => "bars" >> b => ["bars", "baz"] >> a => ["bars", "baz"] >> c => ["bar", "baz"] >> a.object_id => 2157344160 >> b.object_id => 2157338800 >> c.object_id => 2157328340 >> a[0].object_id => 2157344140 >> b[0].object_id => 2157344140 >> c[0].object_id => 2157328320 Regards, Rimantas -- http://rimantas.com