diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-06-02 19:00:25 -0500 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-06-02 19:00:25 -0500 |
commit | 29641ff05ad1beb659582a3c4347c1395f940285 (patch) | |
tree | dcd60175e166352544453909a5410006e6e47623 /activesupport/lib/active_support/core_ext/hash | |
parent | 4b4aa8f6e08ba2aa2ddce56f1d5b631a78eeef6c (diff) | |
download | rails-29641ff05ad1beb659582a3c4347c1395f940285.tar.gz rails-29641ff05ad1beb659582a3c4347c1395f940285.tar.bz2 rails-29641ff05ad1beb659582a3c4347c1395f940285.zip |
Fixed the brokeness from 952ec79bec313e0001adfc8c86f7970448d32db9
Diffstat (limited to 'activesupport/lib/active_support/core_ext/hash')
-rw-r--r-- | activesupport/lib/active_support/core_ext/hash/slice.rb | 2 |
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 |