------art_7056_11175599.1171648058883
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

On 2/16/07, Gregory Brown <gregory.t.brown / gmail.com> wrote:
>
> On 2/16/07, Stefan Rusterholz <apeiros / gmx.net> wrote:
> >> a  
> 3
> >> b  .dup rescue a
> 3
> >> b
> 3
>
> What's so bad about that?
>
>
When you use #dup not knowing about this complication, never dup a Fixnum in
testing, but happen to dup one in production - e.g. in a library released to
the public.


Ruby is always about principle-of-least-surprise and this behavior really
surprised me when I first read about it non-list (I've stayed away from
object copies in MY code, because it all seems so hacky and arcane to me...
Truns out it was a good idea)

------art_7056_11175599.1171648058883--