From 7fbb21dc802c9eb96d30c6231e2b3dc473dbe9dd Mon Sep 17 00:00:00 2001 From: AvnerCohen Date: Sun, 21 Oct 2012 22:28:50 +0200 Subject: More changes around 1.9 hash syntax Added missing space in previous hash related commit --- activesupport/lib/active_support/core_ext/hash/deep_merge.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activesupport/lib/active_support/core_ext/hash/deep_merge.rb') diff --git a/activesupport/lib/active_support/core_ext/hash/deep_merge.rb b/activesupport/lib/active_support/core_ext/hash/deep_merge.rb index 83f0c87b04..6ce2847ab5 100644 --- a/activesupport/lib/active_support/core_ext/hash/deep_merge.rb +++ b/activesupport/lib/active_support/core_ext/hash/deep_merge.rb @@ -4,10 +4,10 @@ class Hash # h1 = { x: { y: [4,5,6] }, z: [7,8,9] } # h2 = { 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]} + # h1.deep_merge(h2) #=> {x: {y: [7, 8, 9]}, z: "xyz"} + # h2.deep_merge(h1) #=> {x: {y: [4, 5, 6]}, z: [7, 8, 9]} # h1.deep_merge(h2) { |key, old, new| Array.wrap(old) + Array.wrap(new) } - # #=> {:x => {:y => [4, 5, 6, 7, 8, 9]}, :z => [7, 8, 9, "xyz"]} + # #=> {x: {y: [4, 5, 6, 7, 8, 9]}, z: [7, 8, 9, "xyz"]} def deep_merge(other_hash, &block) dup.deep_merge!(other_hash, &block) end -- cgit v1.2.3