From cb2381696029ad839ecddad08afea061d07685fb Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Mon, 9 Jul 2007 21:49:37 +0000 Subject: Added Hash#except which is the inverse of Hash#slice -- return the hash except the keys that are specified [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7172 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/core_ext/hash.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/core_ext/hash.rb') diff --git a/activesupport/lib/active_support/core_ext/hash.rb b/activesupport/lib/active_support/core_ext/hash.rb index 2a99468b4e..b805d2da62 100644 --- a/activesupport/lib/active_support/core_ext/hash.rb +++ b/activesupport/lib/active_support/core_ext/hash.rb @@ -1,4 +1,4 @@ -%w(keys indifferent_access reverse_merge conversions diff slice).each do |ext| +%w(keys indifferent_access reverse_merge conversions diff slice except).each do |ext| require "#{File.dirname(__FILE__)}/hash/#{ext}" end @@ -9,4 +9,5 @@ class Hash #:nodoc: include ActiveSupport::CoreExtensions::Hash::Conversions include ActiveSupport::CoreExtensions::Hash::Diff include ActiveSupport::CoreExtensions::Hash::Slice + include ActiveSupport::CoreExtensions::Hash::Except end -- cgit v1.2.3