public
Description: Mash is a Hash with the ability to read, write, and test for the presence of arbitrary attributes using method calls.
Home | Edit | New

BUG? deep_update - does it work?


>> a=Mhash.new({:a=>"This is a",:sub=>{:a=>"two"}})

>> b=Mhash.new({:b=>"This is b",:sub=>{:b=>"two"}})

>> a
=> <Mhash a="This is a" sub=<Mhash a="two">>
>> b
=> <Mhash b="This is b" sub=<Mhash b="two">>

>> a.deep_update b
=> {"sub"=><Mhash b="two">, "b"=>"This is b"}

>> a
=> <Mhash a="This is a" b="This is b" sub=<Mhash b="two">>

I think that sub should be = but it’s not… am I missing what deep_update should do?

Last edited by phedders, Mon Oct 06 04:04:17 -0700 2008
Home | Edit | New
Versions: