From: Eric Mahurin Date: 2005-05-01T06:46:23+09:00 Subject: Cloning into an object Anybody know how to generically copy (shallow like clone) an object into another object? It would be nice to handle the case where the objects have a different class, but I would at least like to know how to do it when the classes are the same. Here is an example of what I would like to do: dest = Object.new # or String.new if necessary source = "hello world" destid = dest.id source.clone_into(dest) dest -> "hello world" dest.id==destid -> true dest.class -> String __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com