From 0920e69244026ec83471bb4571e56300045307d3 Mon Sep 17 00:00:00 2001 From: Lourens Naude Date: Sun, 12 Jul 2009 12:18:04 +0100 Subject: ActiveSupport Hash optimizations [#2902 state:resolved] Signed-off-by: Carl Lerche --- activesupport/lib/active_support/core_ext/hash/reverse_merge.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/core_ext/hash/reverse_merge.rb') diff --git a/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb b/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb index ebfdcb2cf0..d7ebd5feef 100644 --- a/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb +++ b/activesupport/lib/active_support/core_ext/hash/reverse_merge.rb @@ -21,7 +21,7 @@ class Hash # Performs the opposite of merge, with the keys and values from the first hash taking precedence over the second. # Modifies the receiver in place. def reverse_merge!(other_hash) - replace(reverse_merge(other_hash)) + merge!( other_hash ){|k,o,n| o } end alias_method :reverse_update, :reverse_merge! -- cgit v1.2.3