Lyle Johnson wrote:
> copies. The primary difference is that 'clone' copies an object's *entire*
> state, including its freeze status and instance variables, whereas 'dup'
> only copies the basic object contents. Why this distinction? That is a dandy

By golly, you're right. A good thing to remember.

irb(main):001:0> x = "foo"
"foo"
irb(main):002:0> x.instance_eval { @y = 2 }
2
irb(main):003:0> x
"foo"
irb(main):004:0> x.instance_eval { @y }
2
irb(main):005:0> x.dup.instance_eval { @y }
nil
irb(main):006:0> x.clone.instance_eval { @y }
2