From: Robert Dober Date: 2009-01-06T01:20:44+09:00 Subject: Re: Hash is not merged / recursive function On Mon, Jan 5, 2009 at 3:35 PM, Dominik Krebs wrote: I have no idea what's wrong with your code, but I happen to know a Ruby Guru, so I asked him for help, here is what he told me, hopefully that will enlighten you ;) 504/7 > irb irb(main):001:0> options={:value => 42} => {:value=>42} irb(main):002:0> options.update( :answer => 42 ) => {:value=>42, :answer=>42} irb(main):003:0> options => {:value=>42, :answer=>42} irb(main):004:0> options.merge( :wisdom => 42 ) => {:value=>42, :answer=>42, :wisdom=>42} irb(main):005:0> options => {:value=>42, :answer=>42} irb(main):006:0> options.merge!( :wisdom => 42 ) => {:value=>42, :answer=>42, :wisdom=>42} irb(main):007:0> options => {:value=>42, :answer=>42, :wisdom=>42} HTH Robert -- It is change, continuing change, inevitable change, that is the dominant factor in society today. No sensible decision can be made any longer without taking into account not only the world as it is, but the world as it will be ... ~ Isaac Asimov