From: Tom Gilbert Date: 2002-08-07T17:39:16+09:00 Subject: Re: Dup and Clone * Patrick Bennett (patrick.bennett@inin.com) wrote: > Strings are admittedly a bad example (because dup or clone for a string > works just fine), but it's an obvious litmus test. > > The thing is, if it's so easy to do, and it seems to 'work,' why isn't > it already defined in Ruby? > Any experts out there care to shed some light on the subject to a Ruby > newbie? I think that's because there are cases when Marshal won't work. Adding a core feature that "sometimes works" is not something I'd do :) Quoted from ri Marshal: Some objects cannot be dumped: if the objects to be dumped include bindings, procedure objects, instances of class IO, or singleton objects, a TypeError will be raised. Tom. -- .^. .-------------------------------------------------------. /V\ | Tom Gilbert, London, England | http://linuxbrit.co.uk | /( )\ | Open Source/UNIX consultant | tom@linuxbrit.co.uk | ^^-^^ `-------------------------------------------------------'