diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-01-03 10:12:02 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-01-03 10:12:02 +0000 |
commit | 3b9aaf9b02d5814202c5e9dfbc1112c0ff057cc1 (patch) | |
tree | 39497ca8029d36d6031f9963f49a7e2b00a07c53 /io.c | |
parent | 467e07c53c4292f0ba75c87aa944566fffa9d6b4 (diff) | |
download | ruby-3b9aaf9b02d5814202c5e9dfbc1112c0ff057cc1.tar.gz ruby-3b9aaf9b02d5814202c5e9dfbc1112c0ff057cc1.tar.xz ruby-3b9aaf9b02d5814202c5e9dfbc1112c0ff057cc1.zip |
* io.c (rb_io_getline): lineno update condition was wrong.
[ruby-dev:30065]
* io.c (rb_io_getline_fast): ditto.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@11463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1644,7 +1644,7 @@ rb_io_getline_fast(OpenFile *fptr, unsigned char delim, long limit) } if (!NIL_P(str)) { - if (limit > 0) { + if (limit != 0) { fptr->lineno++; lineno = INT2FIX(fptr->lineno); } @@ -1740,7 +1740,7 @@ rb_io_getline(int argc, VALUE *argv, VALUE io) } if (!NIL_P(str)) { - if (limit > 0) { + if (limit != 0) { fptr->lineno++; lineno = INT2FIX(fptr->lineno); } |