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

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.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54539 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-04-11 08:06:23 +00:00
parent 015b492281
commit ba001b4160

View file

@ -61,7 +61,7 @@ class TestWhileuntil < Test::Unit::TestCase
tmp = open(tmpfilename, "r") tmp = open(tmpfilename, "r")
while line = tmp.gets() while line = tmp.gets()
break if 3 break if $. == 3
assert_no_match(/vt100/, line) assert_no_match(/vt100/, line)
assert_no_match(/Amiga/, line) assert_no_match(/Amiga/, line)
assert_no_match(/paper/, line) assert_no_match(/paper/, line)