mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* io.c (rb_io_getline): lineno update condition was wrong.
[ruby-dev:30065] * io.c (rb_io_getline_fast): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
16f70ed4ba
commit
265aaee91c
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
Wed Jan 3 18:49:15 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* io.c (rb_io_getline): lineno update condition was wrong.
|
||||||
|
[ruby-dev:30065]
|
||||||
|
|
||||||
|
* io.c (rb_io_getline_fast): ditto.
|
||||||
|
|
||||||
Wed Jan 3 11:36:51 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Wed Jan 3 11:36:51 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* io.c (ruby_dup): start GC on ENOMEM as well.
|
* io.c (ruby_dup): start GC on ENOMEM as well.
|
||||||
|
|
4
io.c
4
io.c
|
@ -1644,7 +1644,7 @@ rb_io_getline_fast(OpenFile *fptr, unsigned char delim, long limit)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!NIL_P(str)) {
|
if (!NIL_P(str)) {
|
||||||
if (limit > 0) {
|
if (limit != 0) {
|
||||||
fptr->lineno++;
|
fptr->lineno++;
|
||||||
lineno = INT2FIX(fptr->lineno);
|
lineno = INT2FIX(fptr->lineno);
|
||||||
}
|
}
|
||||||
|
@ -1740,7 +1740,7 @@ rb_io_getline(int argc, VALUE *argv, VALUE io)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!NIL_P(str)) {
|
if (!NIL_P(str)) {
|
||||||
if (limit > 0) {
|
if (limit != 0) {
|
||||||
fptr->lineno++;
|
fptr->lineno++;
|
||||||
lineno = INT2FIX(fptr->lineno);
|
lineno = INT2FIX(fptr->lineno);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue