1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

avoid method redefinition.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2010-02-14 03:09:53 +00:00
parent 0fd75b46b7
commit 47b8a0e7e4
6 changed files with 7 additions and 7 deletions

View file

@ -369,7 +369,7 @@ EOT
assert(r =~ s, "#{encdump(r)} =~ #{encdump(s)}")
end
def test_casecmp
def test_casecmp2
assert_equal(0, "\0A".force_encoding("UTF-16BE").casecmp("\0a".force_encoding("UTF-16BE")))
assert_not_equal(0, "\0A".force_encoding("UTF-16LE").casecmp("\0a".force_encoding("UTF-16LE")))
assert_not_equal(0, "A\0".force_encoding("UTF-16BE").casecmp("a\0".force_encoding("UTF-16BE")))

View file

@ -886,7 +886,7 @@ class TestEncodingConverter < Test::Unit::TestCase
Encoding::Converter.search_convpath("ISO-8859-1", "UTF-32BE", universal_newline: true))
end
def test_invalid_replace
def test_invalid_replace2
assert_raise(ArgumentError) {
broken = "\x80".force_encoding("euc-jp")
"".encode("euc-jp", :undef => :replace, :replace => broken)

View file

@ -376,7 +376,7 @@ class TestHash < Test::Unit::TestCase
assert_equal('nil', @h.fetch(nil))
end
def test_key?
def test_key2?
assert(!@cls[].key?(1))
assert(!@cls[].key?(nil))
assert(@h.key?(nil))
@ -648,7 +648,7 @@ class TestHash < Test::Unit::TestCase
assert_equal(hb, h2)
end
def test_value?
def test_value2?
assert(!@cls[].value?(1))
assert(!@cls[].value?(nil))
assert(@h.value?(nil))

View file

@ -620,7 +620,7 @@ class TestProc < Test::Unit::TestCase
assert_equal [1, 2, 3, 4, 5, 6, Proc, :x], (pr.call(1, 2, 3, 4, 5, 6, 7){|x| x})
end
def test_proc_args_opt_and_block
def test_proc_args_opt_and_block2
pr = proc {|a,b,c=:c,d=:d,*e,&f|
[a, b, c, d, e, f.class, f&&f.call(:x)]
}

View file

@ -685,7 +685,7 @@ class TestStringScanner < Test::Unit::TestCase
s.scan(/ string/)
end
def test_inspect
def test_inspect2
s = StringScanner.new('test string test')
s.scan(/test strin/)
assert_equal('#<StringScanner 10/16 "...strin" @ "g tes...">', s.inspect)

View file

@ -535,7 +535,7 @@ if defined? Zlib
assert_equal("foobar".each_byte.to_a, a)
end
def test_gets
def test_gets2
t = Tempfile.new("test_zlib_gzip_reader")
t.close
Zlib::GzipWriter.open(t.path) {|gz| gz.print("foo\nbar\nbaz\n") }