diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2016-07-29 14:45:20 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-29 14:45:20 -0700 |
commit | afc9a8256741bfd7a3ff5c5d60b9135dace80f29 (patch) | |
tree | ba625a7249b4da3072d05ec27f4ce643d5010f73 /activesupport/lib | |
parent | 3916656f8e9700eb5f1cfc441ff66e1f12173683 (diff) | |
download | rails-afc9a8256741bfd7a3ff5c5d60b9135dace80f29.tar.gz rails-afc9a8256741bfd7a3ff5c5d60b9135dace80f29.tar.bz2 rails-afc9a8256741bfd7a3ff5c5d60b9135dace80f29.zip |
Revert "Adds `not_in?` onto Object"
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/core_ext/object.rb | 1 | ||||
-rw-r--r-- | activesupport/lib/active_support/core_ext/object/exclusion.rb | 15 |
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 |