diff options
| author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-21 09:16:06 +0000 |
|---|---|---|
| committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-06-21 09:16:06 +0000 |
| commit | 6310f23f2ee5758ba235beaed3c0281bc7e98b3a (patch) | |
| tree | 0d5e25bd4834697e2db75b45f345ad8df5f9e242 /test | |
| parent | 2025bee606e4529cf2505df9daa88f15d1c1da97 (diff) | |
merges the latter half of r23699 and r23706 from trunk into ruby_1_9_1.
--
* io.c (argf_skip): should close only when current_file is available.
--
* test/ruby/test_argf.rb (TestArgf#test_skip): updated test
according to clarified behavior.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@23790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
| -rw-r--r-- | test/ruby/test_argf.rb | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/test/ruby/test_argf.rb b/test/ruby/test_argf.rb index 9e18a80b4..a6c224ba4 100644 --- a/test/ruby/test_argf.rb +++ b/test/ruby/test_argf.rb @@ -658,16 +658,12 @@ class TestArgf < Test::Unit::TestCase def test_skip ruby('-e', <<-SRC, @t1.path, @t2.path, @t3.path) do |f| - begin - ARGF.skip - rescue - puts "cannot skip" # ??? - end + ARGF.skip puts ARGF.gets ARGF.skip puts ARGF.read SRC - assert_equal("cannot skip\n1\n3\n4\n5\n6\n", f.read) + assert_equal("1\n3\n4\n5\n6\n", f.read) end end |
