Skip to content

Instantly share code, notes, and snippets.

@mdkent
Created January 11, 2010 23:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdkent/274733 to your computer and use it in GitHub Desktop.
Save mdkent/274733 to your computer and use it in GitHub Desktop.
with extlib loaded
irb(main):011:0> a = { :x => "test" }
=> {:x=>"test"}
irb(main):012:0> b = { :x => " " }
=> {:x=>" "}
irb(main):013:0> p a.deep_merge!(b)
{:x=>"test"}
=> nil
without extlib
irb(main):006:0> a = { :x => "test" }
=> {:x=>"test"}
irb(main):007:0> b = { :x => " " }
=> {:x=>" "}
irb(main):008:0> p a.deep_merge!(b)
{:x=>" "}
=> nil
with extlib loaded and patch from http://gist.github.com/274453
irb(main):006:0> a = { :x => true }
=> {:x=>true}
irb(main):007:0> b = { :x => false }
=> {:x=>false}
irb(main):008:0> p a.deep_merge!(b)
{:x=>true}
=> nil
without extlib loaded and patch from http://gist.github.com/274453
irb(main):003:0> a = { :x => true }
=> {:x=>true}
irb(main):004:0> b = { :x => false }
=> {:x=>false}
irb(main):005:0> p a.deep_merge!(b)
{:x=>false}
=> nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment