On 2/16/07, Robert Dober <robert.dober / gmail.com> wrote:
> On 2/16/07, Phrogz <gavin / refinery.com> wrote:

> > b) You should never ever write "a.dup rescue a" because it will give
> > you strange problems if a might refer to a mutable object that doesn't
> > respond to #dup.
> Neve say never ;) but when you write
> a.dup rescue a
> you should be aware of that potential danger

Right.  My only point was that this solved what the OP asked for
without being hard.
It just seems like that solution is no better or worse than changing
the behaviour of dup, except for the fact that it puts the burden of
bad design into the programmer's hands, and not that of the
programming language :)