ruby-changes:12118
From: yugui <ko1@a...>
Date: Sun, 21 Jun 2009 18:16:22 +0900 (JST)
Subject: [ruby-changes:12118] Ruby:r23790 (ruby_1_9_1): merges the latter half of r23699 and r23706 from trunk into ruby_1_9_1.
yugui 2009-06-21 18:16:06 +0900 (Sun, 21 Jun 2009) New Revision: 23790 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=23790 Log: 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. Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/io.c branches/ruby_1_9_1/test/ruby/test_argf.rb branches/ruby_1_9_1/version.h Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 23789) +++ ruby_1_9_1/ChangeLog (revision 23790) @@ -1,3 +1,12 @@ +Wed Jun 17 00:31:30 2009 Yukihiro Matsumoto <matz@r...> + + * test/ruby/test_argf.rb (TestArgf#test_skip): updated test + according to clarified behavior. + +Tue Jun 16 06:40:31 2009 Yukihiro Matsumoto <matz@r...> + + * io.c (argf_skip): should close only when current_file is available. + Mon Jun 15 22:35:31 2009 Tadayoshi Funaba <tadf@d...> * bignum.c (rb_big2db): (-Float::MAX.to_i*2).to_f should return Index: ruby_1_9_1/io.c =================================================================== --- ruby_1_9_1/io.c (revision 23789) +++ ruby_1_9_1/io.c (revision 23790) @@ -8292,7 +8292,7 @@ static VALUE argf_skip(VALUE argf) { - if (ARGF.next_p != -1) { + if (ARGF.init_p && ARGF.next_p == 0) { argf_close(ARGF.current_file); ARGF.next_p = 1; } Index: ruby_1_9_1/version.h =================================================================== --- ruby_1_9_1/version.h (revision 23789) +++ ruby_1_9_1/version.h (revision 23790) @@ -1,6 +1,6 @@ #define RUBY_VERSION "1.9.1" #define RUBY_RELEASE_DATE "2009-05-22" -#define RUBY_PATCHLEVEL 180 +#define RUBY_PATCHLEVEL 181 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 9 #define RUBY_VERSION_TEENY 1 Index: ruby_1_9_1/test/ruby/test_argf.rb =================================================================== --- ruby_1_9_1/test/ruby/test_argf.rb (revision 23789) +++ ruby_1_9_1/test/ruby/test_argf.rb (revision 23790) @@ -658,16 +658,12 @@ 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 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/