ruby-changes:40772
From: hsbt <ko1@a...>
Date: Wed, 2 Dec 2015 14:56:30 +0900 (JST)
Subject: [ruby-changes:40772] hsbt:r52851 (trunk): * test/ruby/test_string.rb: removed non executing tests.
hsbt 2015-12-02 14:56:10 +0900 (Wed, 02 Dec 2015) New Revision: 52851 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=52851 Log: * test/ruby/test_string.rb: removed non executing tests. [Misc #11757][ruby-dev:49397] Modified files: trunk/ChangeLog trunk/test/ruby/test_string.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 52850) +++ ChangeLog (revision 52851) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Dec 2 14:55:01 2015 yui-knk <spiketeika@g...> + + * test/ruby/test_string.rb: removed non executing tests. + [Misc #11757][ruby-dev:49397] + Wed Dec 2 11:23:06 2015 SHIBATA Hiroshi <hsbt@r...> * lib/csv.rb: enable frozen_string_literal. Index: test/ruby/test_string.rb =================================================================== --- test/ruby/test_string.rb (revision 52850) +++ test/ruby/test_string.rb (revision 52851) @@ -1,9 +1,5 @@ https://github.com/ruby/ruby/blob/trunk/test/ruby/test_string.rb#L1 require 'test/unit' -# use of $= is deprecated after 1.7.1 -def pre_1_7_1 -end - class TestString < Test::Unit::TestCase ENUMERATOR_WANTARRAY = RUBY_VERSION >= "3.0.0" @@ -126,20 +122,6 @@ class TestString < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_string.rb#L122 s[S("Foo")] = S("Bar") assert_equal(S("BarBar"), s) - pre_1_7_1 do - s = S("FooBar") - s[S("Foo")] = S("xyz") - assert_equal(S("xyzBar"), s) - - $= = true - s = S("FooBar") - s[S("FOO")] = S("Bar") - assert_equal(S("BarBar"), s) - s[S("FOO")] = S("xyz") - assert_equal(S("BarBar"), s) - $= = false - end - s = S("a string") s[0..s.size] = S("another string") assert_equal(S("another string"), s) @@ -160,12 +142,6 @@ class TestString < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_string.rb#L142 assert_equal(-1, S("ABCDEF") <=> S("abcdef")) - pre_1_7_1 do - $= = true - assert_equal(0, S("ABCDEF") <=> S("abcdef")) - $= = false - end - assert_nil("foo" <=> Object.new) o = Object.new @@ -189,13 +165,6 @@ class TestString < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_string.rb#L165 assert_not_equal(:foo, S("foo")) assert_equal(S("abcdef"), S("abcdef")) - pre_1_7_1 do - $= = true - assert_equal(S("CAT"), S('cat')) - assert_equal(S("CaT"), S('cAt')) - $= = false - end - assert_not_equal(S("CAT"), S('cat')) assert_not_equal(S("CaT"), S('cAt')) @@ -235,12 +204,6 @@ class TestString < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_string.rb#L204 assert_equal(10, S("FeeFieFoo-Fum") =~ /Fum$/) assert_equal(nil, S("FeeFieFoo-Fum") =~ /FUM$/) - pre_1_7_1 do - $= = true - assert_equal(10, S("FeeFieFoo-Fum") =~ /FUM$/) - $= = false - end - o = Object.new def o.=~(x); x + "bar"; end assert_equal("foobar", S("foo") =~ o) @@ -292,13 +255,6 @@ class TestString < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_string.rb#L255 # assert_equal(true, S("foo") === :foo) casetest(S("abcdef"), S("abcdef")) - pre_1_7_1 do - $= = true - casetest(S("CAT"), S('cat')) - casetest(S("CaT"), S('cAt')) - $= = false - end - casetest(S("CAT"), S('cat'), true) # Reverse the test - we don't want to casetest(S("CaT"), S('cAt'), true) # find these in the case. end @@ -1309,14 +1265,6 @@ class TestString < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_string.rb#L1265 assert_equal(S("Bar"), a.slice!(S("Bar"))) assert_equal(S("Foo"), a) - pre_1_7_1 do - a=S("FooBar") - assert_nil(a.slice!(S("xyzzy"))) - assert_equal(S("FooBar"), a) - assert_nil(a.slice!(S("plugh"))) - assert_equal(S("FooBar"), a) - end - assert_raise(ArgumentError) { "foo".slice! } end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/