ruby-changes:8433
From: nobu <ko1@a...>
Date: Mon, 27 Oct 2008 15:56:32 +0900 (JST)
Subject: [ruby-changes:8433] Ruby:r19964 (trunk): * io.c (argf_init): initial value of $. should be 0.
nobu 2008-10-27 15:55:06 +0900 (Mon, 27 Oct 2008) New Revision: 19964 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=19964 Log: * io.c (argf_init): initial value of $. should be 0. see [ruby-dev:36937]. Modified files: trunk/ChangeLog trunk/io.c trunk/test/ruby/test_io.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 19963) +++ ChangeLog (revision 19964) @@ -1,3 +1,8 @@ +Mon Oct 27 15:55:04 2008 Nobuyoshi Nakada <nobu@r...> + + * io.c (argf_init): initial value of $. should be 0. + see [ruby-dev:36937]. + Mon Oct 27 15:38:38 2008 Yuki Sonoda (Yugui) <yugui@y...> * test/minitest/test_mini_test.rb Index: io.c =================================================================== --- io.c (revision 19963) +++ io.c (revision 19964) @@ -5821,7 +5821,7 @@ { p->filename = Qnil; p->current_file = Qnil; - p->lineno = Qnil; + p->lineno = INT2FIX(0); p->argv = v; } Index: test/ruby/test_io.rb =================================================================== --- test/ruby/test_io.rb (revision 19963) +++ test/ruby/test_io.rb (revision 19964) @@ -812,7 +812,7 @@ f.gets; p $. end SRC - assert_equal("nil,1,2,2,1001,1001,1001,1,2,3,3", f.read.chomp.gsub("\n", ",")) + assert_equal("0,1,2,2,1001,1001,1001,1,2,3,3", f.read.chomp.gsub("\n", ",")) end pipe(proc do |w| -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/