Apologies for the formatting screw-up. The deep_copy function is here:
One thing that confused the issue a little for me is the fact that some objects in Ruby are actually only really 'pretend objects'. ie:
>> test = 4
=> 4
>> test2 = 4
=> 4
>> test.object_id
=> 9
>> test2.object_id
=> 9
I don't know enough about the deeper parts of the language to know what else there is that's like this though... >> ((1 << 30) - 1).class
=> Fixnum
>> ((1 << 30)).class
=> Bignum
>> ((1 << 30) - 1).object_id
=> 2147483647
>> ((1 << 30) - 1).object_id
=> 2147483647
>> (1<<30).object_id
=> 166070
>> (1<<30).object_id
=> 161200