aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/object/inclusion_test.rb
diff options
context:
space:
mode:
authorBrian Morearty <brian@morearty.org>2013-05-01 04:32:20 -0700
committerBrian Morearty <brian@morearty.org>2013-05-01 04:32:20 -0700
commitd7da403dde3a037a014741420bb7c6e7c7521a48 (patch)
treeb4ae451a05c7abbfa71005322666e02b32455cfd /activesupport/test/core_ext/object/inclusion_test.rb
parent7ead1d81431b2c2c0366347b7bfdf9a329b6f934 (diff)
downloadrails-d7da403dde3a037a014741420bb7c6e7c7521a48.tar.gz
rails-d7da403dde3a037a014741420bb7c6e7c7521a48.tar.bz2
rails-d7da403dde3a037a014741420bb7c6e7c7521a48.zip
Revert "Object#in? also accepts multiple parameters"
This reverts commit ebf69ab1636df74c76332c53bcd3d8494fb91b45. `in?` must not take multiple parameters because its behavior would be ambiguous: # Test if "B" is included in a list of names with `"B".in?(*names)`: names = ["BMorearty"] "B".in?(*names) # => true names = ["BMorearty","rubyduo"] "B".in?(*names) # => false Conflicts: activesupport/lib/active_support/core_ext/object/inclusion.rb activesupport/test/core_ext/object/inclusion_test.rb
Diffstat (limited to 'activesupport/test/core_ext/object/inclusion_test.rb')
-rw-r--r--activesupport/test/core_ext/object/inclusion_test.rb10
1 files changed, 0 insertions, 10 deletions
diff --git a/activesupport/test/core_ext/object/inclusion_test.rb b/activesupport/test/core_ext/object/inclusion_test.rb
index 22888333f5..478706eeae 100644
--- a/activesupport/test/core_ext/object/inclusion_test.rb
+++ b/activesupport/test/core_ext/object/inclusion_test.rb
@@ -2,16 +2,6 @@ require 'abstract_unit'
require 'active_support/core_ext/object/inclusion'
class InTest < ActiveSupport::TestCase
- def test_in_multiple_args
- assert :b.in?(:a,:b)
- assert !:c.in?(:a,:b)
- end
-
- def test_in_multiple_arrays
- assert [1,2].in?([1,2],[2,3])
- assert ![1,2].in?([1,3],[2,1])
- end
-
def test_in_array
assert 1.in?([1,2])
assert !3.in?([1,2])