From 47b8a0e7e4a04a28e57c3f9bb712a1f88d9e27bb Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 14 Feb 2010 03:09:53 +0000 Subject: [PATCH] avoid method redefinition. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/enc/test_utf16.rb | 2 +- test/ruby/test_econv.rb | 2 +- test/ruby/test_hash.rb | 4 ++-- test/ruby/test_proc.rb | 2 +- test/strscan/test_stringscanner.rb | 2 +- test/zlib/test_zlib.rb | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/test/ruby/enc/test_utf16.rb b/test/ruby/enc/test_utf16.rb index 52850e6376..90a8314067 100644 --- a/test/ruby/enc/test_utf16.rb +++ b/test/ruby/enc/test_utf16.rb @@ -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"))) diff --git a/test/ruby/test_econv.rb b/test/ruby/test_econv.rb index 11f5bad2ad..cc03eaf218 100644 --- a/test/ruby/test_econv.rb +++ b/test/ruby/test_econv.rb @@ -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) diff --git a/test/ruby/test_hash.rb b/test/ruby/test_hash.rb index 6f703d947c..79ce095733 100644 --- a/test/ruby/test_hash.rb +++ b/test/ruby/test_hash.rb @@ -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)) diff --git a/test/ruby/test_proc.rb b/test/ruby/test_proc.rb index 213566903e..f6fd5c8ea0 100644 --- a/test/ruby/test_proc.rb +++ b/test/ruby/test_proc.rb @@ -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)] } diff --git a/test/strscan/test_stringscanner.rb b/test/strscan/test_stringscanner.rb index ec6c6994ce..f8b5836919 100644 --- a/test/strscan/test_stringscanner.rb +++ b/test/strscan/test_stringscanner.rb @@ -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('#', s.inspect) diff --git a/test/zlib/test_zlib.rb b/test/zlib/test_zlib.rb index 6982db7a5f..1aaf3fac8c 100644 --- a/test/zlib/test_zlib.rb +++ b/test/zlib/test_zlib.rb @@ -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") }