summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Doubrovkine (dB.) @dblockdotorg <dblock@dblock.org>2014-10-10 09:32:37 -0400
committerDaniel Doubrovkine (dB.) @dblockdotorg <dblock@dblock.org>2014-10-10 09:32:37 -0400
commit487514922c5aaf0ce0fd822606edb4e1af851793 (patch)
tree1995b0f07710472885c8fd49e92f3434a2f0cab6
parentb8154d4b740d674303af4157098d0f4f08ada539 (diff)
parentdf67e5044d22dd052ff06b24793f9d6c417cddbc (diff)
downloadhashie-487514922c5aaf0ce0fd822606edb4e1af851793.tar.gz
Merge pull request #234 from cvengros/patch-1
README.md: Fixed issue in deep_merge example
-rw-r--r--README.md7
1 files changed, 2 insertions, 5 deletions
diff --git a/README.md b/README.md
index 56f5cbe..1fdf497 100644
--- a/README.md
+++ b/README.md
@@ -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] }