Created
January 11, 2010 23:42
-
-
Save mdkent/274733 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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