From d1575ae1b9658c91145d6a46ec2a144a5a089207 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 12 Apr 2011 00:23:07 +0200 Subject: Change Object#either? to Object#among? -- thanks to @jamesarosen for the suggestion! --- activesupport/test/core_ext/object/inclusion_test.rb | 6 +++--- activesupport/test/transliterate_test.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'activesupport/test') diff --git a/activesupport/test/core_ext/object/inclusion_test.rb b/activesupport/test/core_ext/object/inclusion_test.rb index b4207c20ea..25120deb81 100644 --- a/activesupport/test/core_ext/object/inclusion_test.rb +++ b/activesupport/test/core_ext/object/inclusion_test.rb @@ -31,9 +31,9 @@ class InTest < Test::Unit::TestCase end def test_either - assert 1.either?(1,2,3) - assert !5.either?(1,2,3) - assert [1,2,3].either?([1,2,3], 2, [3,4,5]) + assert 1.among?(1,2,3) + assert !5.among?(1,2,3) + assert [1,2,3].among?([1,2,3], 2, [3,4,5]) end module A diff --git a/activesupport/test/transliterate_test.rb b/activesupport/test/transliterate_test.rb index 09271b759d..90b40b5478 100644 --- a/activesupport/test/transliterate_test.rb +++ b/activesupport/test/transliterate_test.rb @@ -16,7 +16,7 @@ class TransliterateTest < Test::Unit::TestCase # create string with range of Unicode"s western characters with # diacritics, excluding the division and multiplication signs which for # some reason or other are floating in the middle of all the letters. - string = (0xC0..0x17E).to_a.reject {|c| c.either?(0xD7, 0xF7)}.pack("U*") + string = (0xC0..0x17E).to_a.reject {|c| c.among?(0xD7, 0xF7)}.pack("U*") string.each_char do |char| assert_match %r{^[a-zA-Z']*$}, ActiveSupport::Inflector.transliterate(string) end -- cgit v1.2.3