aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2008-06-02 19:00:25 -0500
committerDavid Heinemeier Hansson <david@loudthinking.com>2008-06-02 19:00:25 -0500
commit29641ff05ad1beb659582a3c4347c1395f940285 (patch)
treedcd60175e166352544453909a5410006e6e47623 /activesupport
parent4b4aa8f6e08ba2aa2ddce56f1d5b631a78eeef6c (diff)
downloadrails-29641ff05ad1beb659582a3c4347c1395f940285.tar.gz
rails-29641ff05ad1beb659582a3c4347c1395f940285.tar.bz2
rails-29641ff05ad1beb659582a3c4347c1395f940285.zip
Fixed the brokeness from 952ec79bec313e0001adfc8c86f7970448d32db9
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/core_ext/hash/slice.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/hash/slice.rb b/activesupport/lib/active_support/core_ext/hash/slice.rb
index 44b6964c69..1b2c8f63e3 100644
--- a/activesupport/lib/active_support/core_ext/hash/slice.rb
+++ b/activesupport/lib/active_support/core_ext/hash/slice.rb
@@ -16,7 +16,7 @@ module ActiveSupport #:nodoc:
def slice(*keys)
allowed = Set.new(respond_to?(:convert_key) ? keys.map { |key| convert_key(key) } : keys)
hash = {}
- allowed.each { |k| hash[k] = self[k] }
+ allowed.each { |k| hash[k] = self[k] if has_key?(k) }
hash
end