From 29641ff05ad1beb659582a3c4347c1395f940285 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 2 Jun 2008 19:00:25 -0500 Subject: Fixed the brokeness from 952ec79bec313e0001adfc8c86f7970448d32db9 --- activesupport/lib/active_support/core_ext/hash/slice.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport') 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 -- cgit v1.2.3