summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-01-03 09:56:43 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-01-03 09:56:43 +0000
commit220800c4651b7c40141e5573af31c14f55c9d6bf (patch)
tree21dc230b118db3635acd76658c9147d45ff83307
parente4c57262cf2f9ad59962099697fd7172e01a244f (diff)
downloadruby-220800c4651b7c40141e5573af31c14f55c9d6bf.tar.gz
* 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/branches/matzruby@11462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog7
-rw-r--r--io.c4
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index dab43ceeef..1ff7e86661 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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 16:04:51 2007 Yukihiro Matsumoto <matz@ruby-lang.org>
* version.c (ruby_show_version): change line to distinguish from
diff --git a/io.c b/io.c
index 9e8710897c..35c406a2a3 100644
--- a/io.c
+++ b/io.c
@@ -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);
}