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

ruby-changes:42465

From: nobu <ko1@a...>
Date: Mon, 11 Apr 2016 16:18:09 +0900 (JST)
Subject: [ruby-changes:42465] nobu:r54539 (trunk): test_whileuntil.rb: fix old behavior

nobu	2016-04-11 17:06:23 +0900 (Mon, 11 Apr 2016)

  New Revision: 54539

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

  Log:
    test_whileuntil.rb: fix old behavior
    
    * test/ruby/test_whileuntil.rb (test_while): fix old behavior.
      mere numeric literal in condition no longer matches $. global
      variable.

  Modified files:
    trunk/test/ruby/test_whileuntil.rb
Index: test/ruby/test_whileuntil.rb
===================================================================
--- test/ruby/test_whileuntil.rb	(revision 54538)
+++ test/ruby/test_whileuntil.rb	(revision 54539)
@@ -61,7 +61,7 @@ class TestWhileuntil < Test::Unit::TestC https://github.com/ruby/ruby/blob/trunk/test/ruby/test_whileuntil.rb#L61
 
       tmp = open(tmpfilename, "r")
       while line = tmp.gets()
-        break if 3
+        break if $. == 3
         assert_no_match(/vt100/, line)
         assert_no_match(/Amiga/, line)
         assert_no_match(/paper/, line)

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

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