Skip to content

Commit

Permalink
* io.c (argf_init): initial value of $. should be 0.
Browse files Browse the repository at this point in the history
  see [ruby-dev:36937].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19964 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Oct 27, 2008
1 parent 1a86375 commit 782f3bd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
Mon Oct 27 15:55:04 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>

* 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@yugui.jp>

* test/minitest/test_mini_test.rb
Expand Down
2 changes: 1 addition & 1 deletion io.c
Expand Up @@ -5821,7 +5821,7 @@ argf_init(struct argf *p, VALUE v)
{
p->filename = Qnil;
p->current_file = Qnil;
p->lineno = Qnil;
p->lineno = INT2FIX(0);
p->argv = v;
}

Expand Down
2 changes: 1 addition & 1 deletion test/ruby/test_io.rb
Expand Up @@ -812,7 +812,7 @@ def test_set_lineno
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|
Expand Down

0 comments on commit 782f3bd

Please sign in to comment.