[前][次][番号順一覧][スレッド一覧]

ruby-changes:50972

From: mame <ko1@a...>
Date: Tue, 17 Apr 2018 17:48:04 +0900 (JST)
Subject: [ruby-changes:50972] mame:r63178 (trunk): Remove the old disabled assertions for 1.8/1.9

mame	2018-04-17 17:47:56 +0900 (Tue, 17 Apr 2018)

  New Revision: 63178

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63178

  Log:
    Remove the old disabled assertions for 1.8/1.9

  Modified files:
    trunk/test/ruby/test_basicinstructions.rb
    trunk/test/ruby/test_eval.rb
Index: test/ruby/test_basicinstructions.rb
===================================================================
--- test/ruby/test_basicinstructions.rb	(revision 63177)
+++ test/ruby/test_basicinstructions.rb	(revision 63178)
@@ -117,7 +117,6 @@ class TestBasicInstructions < Test::Unit https://github.com/ruby/ruby/blob/trunk/test/ruby/test_basicinstructions.rb#L117
     assert_equal({1=>2}, {1=>2})
     assert_equal({1=>2, 3=>4}, {1=>2, 3=>4})
     assert_equal({1=>2, 3=>4}, {3=>4, 1=>2})
-    # assert_equal({1=>2, 3=>4}, {1,2, 3,4}) # 1.9 doesn't support
     assert_equal({"key"=>"val"}, {"key"=>"val"})
   end
 
Index: test/ruby/test_eval.rb
===================================================================
--- test/ruby/test_eval.rb	(revision 63177)
+++ test/ruby/test_eval.rb	(revision 63178)
@@ -320,20 +320,6 @@ class TestEval < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_eval.rb#L320
     end
     assert(!bad)
 
-    if false
-      # Ruby 2.0 doesn't see Proc as Binding
-      x = proc{}
-      eval "i4 = 1", x
-      assert_equal(1, eval("i4", x))
-      x = proc{proc{}}.call
-      eval "i4 = 22", x
-      assert_equal(22, eval("i4", x))
-      t = []
-      x = proc{proc{}}.call
-      eval "(0..9).each{|i5| t[i5] = proc{i5*2}}", x
-      assert_equal(8, t[4].call)
-    end
-
     x = binding
     eval "i = 1", x
     assert_equal(1, eval("i", x))
@@ -360,27 +346,6 @@ class TestEval < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_eval.rb#L346
       assert_equal(eval("foo22"), eval("foo22", p))
       assert_equal(55, eval("foo22"))
     }.call
-
-    if false
-      # Ruby 2.0 doesn't see Proc as Binding
-      p1 = proc{i7 = 0; proc{i7}}.call
-      assert_equal(0, p1.call)
-      eval "i7=5", p1
-      assert_equal(5, p1.call)
-      assert(!defined?(i7))
-    end
-
-    if false
-      # Ruby 2.0 doesn't see Proc as Binding
-      p1 = proc{i7 = 0; proc{i7}}.call
-      i7 = nil
-      assert_equal(0, p1.call)
-      eval "i7=1", p1
-      assert_equal(1, p1.call)
-      eval "i7=5", p1
-      assert_equal(5, p1.call)
-      assert_nil(i7)
-    end
   end
 
   def test_nil_instance_eval_cvar

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]