Dossy <dossy / panoptic.com> writes:

> Really?  I thought assignment was shallow copy (both variables
> refer to the same object) while sending #dup to an object caused
> a deep copy, whereby the variable would refer to a new, different
> object.

Assignment is analogous to changing the value of a C's pointer
variable. It does not perform any copying. 

#dup performs shallow copy, only the referred object is copied. If
 that referred object holds some other objects, then the hold objects
 are not copied.

The built-in Marshal class can be used to perform a deep copy. There
are some limitations, though.

YS.