diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-25 08:49:08 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-07-25 08:49:08 +0000 |
| commit | 157e228b816393924d2deb156b514037d7164f6e (patch) | |
| tree | 07805b36cc318388001956c681a8d37d3c09f4ec /test/ruby | |
| parent | 4a43890fb440692bc9301059cff84eaf13c8b1b1 (diff) | |
| download | ruby-157e228b816393924d2deb156b514037d7164f6e.tar.gz ruby-157e228b816393924d2deb156b514037d7164f6e.tar.xz ruby-157e228b816393924d2deb156b514037d7164f6e.zip | |
* io.c (argf_eof): should not have reached EOF before trying to
read. based on a patch by Heesob Park <phasis AT gmail.com> at
[ruby-core:24559]. [ruby-core:24557]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
| -rw-r--r-- | test/ruby/test_argf.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/ruby/test_argf.rb b/test/ruby/test_argf.rb index a6c224ba4..c00db99bf 100644 --- a/test/ruby/test_argf.rb +++ b/test/ruby/test_argf.rb @@ -72,7 +72,7 @@ class TestArgf < Test::Unit::TestCase p [a.gets.chomp, a.lineno, b.gets.chomp, b.lineno] #=> ["5", 5, "5", 8] p [a.gets.chomp, a.lineno, b.gets.chomp, b.lineno] #=> ["6", 6, "6", 9] SRC - expected = src.scan(/\#=> *(.*+)/).flatten + expected = src.scan(/\#=> *(.+)/).flatten ruby('-e', src, @t1.path, @t2.path, @t3.path) do |f| f.each_with_index do |a, i| assert_equal(expected.shift, a.chomp, "[ruby-dev:34445]: line #{i}") @@ -102,7 +102,7 @@ class TestArgf < Test::Unit::TestCase a.gets; p $. #=> 2001 a.gets; p $. #=> 2001 SRC - expected = src.scan(/\#=> *(.*+)/).join(",") + expected = src.scan(/\#=> *(.+)/).join(",") ruby('-e', src, @t1.path, @t2.path, @t3.path) do |f| assert_equal(expected, f.read.chomp.gsub("\n", ",")) end @@ -125,7 +125,7 @@ class TestArgf < Test::Unit::TestCase a.gets; p $. #=> 2000 a.gets; p $. #=> 2000 SRC - expected = src.scan(/\#=> *(.*+)/).join(",") + expected = src.scan(/\#=> *(.+)/).join(",") ruby('-e', src, @t1.path, @t2.path, @t3.path) do |f| assert_equal(expected, f.read.chomp.gsub("\n", ",")) end @@ -433,7 +433,7 @@ class TestArgf < Test::Unit::TestCase end SRC a = f.read.split("\n") - ((%w(true false) * 4).take(7) + %w(end)).each do |x| + (%w(false) + (%w(false true) * 3) + %w(end)).each do |x| assert_equal(x, a.shift) end end |
