aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2016-07-29 14:45:38 -0700
committerGitHub <noreply@github.com>2016-07-29 14:45:38 -0700
commit815b730b1b79158511f9f4c8465c476b9fe9b7e0 (patch)
treeba625a7249b4da3072d05ec27f4ce643d5010f73 /activesupport/lib/active_support/core_ext
parent3916656f8e9700eb5f1cfc441ff66e1f12173683 (diff)
parentafc9a8256741bfd7a3ff5c5d60b9135dace80f29 (diff)
downloadrails-815b730b1b79158511f9f4c8465c476b9fe9b7e0.tar.gz
rails-815b730b1b79158511f9f4c8465c476b9fe9b7e0.tar.bz2
rails-815b730b1b79158511f9f4c8465c476b9fe9b7e0.zip
Merge pull request #25992 from rails/revert-25914-jm/not_in
Revert "Adds `not_in?` onto Object"
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r--activesupport/lib/active_support/core_ext/object.rb1
-rw-r--r--activesupport/lib/active_support/core_ext/object/exclusion.rb15
2 files changed, 0 insertions, 16 deletions
diff --git a/activesupport/lib/active_support/core_ext/object.rb b/activesupport/lib/active_support/core_ext/object.rb
index a2c5a472f5..f4f9152d6a 100644
--- a/activesupport/lib/active_support/core_ext/object.rb
+++ b/activesupport/lib/active_support/core_ext/object.rb
@@ -4,7 +4,6 @@ require 'active_support/core_ext/object/duplicable'
require 'active_support/core_ext/object/deep_dup'
require 'active_support/core_ext/object/try'
require 'active_support/core_ext/object/inclusion'
-require 'active_support/core_ext/object/exclusion'
require 'active_support/core_ext/object/conversions'
require 'active_support/core_ext/object/instance_variables'
diff --git a/activesupport/lib/active_support/core_ext/object/exclusion.rb b/activesupport/lib/active_support/core_ext/object/exclusion.rb
deleted file mode 100644
index 58dfb649e5..0000000000
--- a/activesupport/lib/active_support/core_ext/object/exclusion.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-class Object
- # Returns true if this object is excluded in the argument. Argument must be
- # any object which responds to +#include?+. Usage:
- #
- # characters = ["Konata", "Kagami", "Tsukasa"]
- # "MoshiMoshi".not_in?(characters) # => true
- #
- # This will throw an +ArgumentError+ if the argument doesn't respond
- # to +#include?+.
- def not_in?(another_object)
- !another_object.include?(self)
- rescue NoMethodError
- raise ArgumentError.new("The parameter passed to #not_in? must respond to #include?")
- end
-end \ No newline at end of file