diff options
author | Daniel Doubrovkine (dB.) @dblockdotorg <dblock@dblock.org> | 2014-10-10 09:32:37 -0400 |
---|---|---|
committer | Daniel Doubrovkine (dB.) @dblockdotorg <dblock@dblock.org> | 2014-10-10 09:32:37 -0400 |
commit | 487514922c5aaf0ce0fd822606edb4e1af851793 (patch) | |
tree | 1995b0f07710472885c8fd49e92f3434a2f0cab6 | |
parent | b8154d4b740d674303af4157098d0f4f08ada539 (diff) | |
parent | df67e5044d22dd052ff06b24793f9d6c417cddbc (diff) | |
download | hashie-487514922c5aaf0ce0fd822606edb4e1af851793.tar.gz |
Merge pull request #234 from cvengros/patch-1
README.md: Fixed issue in deep_merge example
-rw-r--r-- | README.md | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -223,11 +223,8 @@ class MyHash < Hash include Hashie::Extensions::DeepMerge end -h1 = MyHash.new -h2 = MyHash.new - -h1 = { x: { y: [4,5,6] }, z: [7,8,9] } -h2 = { x: { y: [7,8,9] }, z: "xyz" } +h1 = MyHash[{ x: { y: [4,5,6] }, z: [7,8,9] }] +h2 = MyHash[{ x: { y: [7,8,9] }, z: "xyz" }] h1.deep_merge(h2) # => { x: { y: [7, 8, 9] }, z: "xyz" } h2.deep_merge(h1) # => { x: { y: [4, 5, 6] }, z: [7, 8, 9] } |