From: Joel VanderWerf Date: 2010-02-23T04:49:42+09:00 Subject: Re: Quick way to copy data from super class into subclass? Audrey A Lee wrote: > Is there a quick way or idiom to copy the data from @your_hash into > @my_hash? Use Hash#update: >> class MyHash < Hash; end => nil >> h = {1=>2} => {1=>2} >> mh = MyHash.new => {} >> mh.update h => {1=>2} >> mh.class => MyHash