diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-26 15:34:33 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-26 15:34:33 +0000 |
commit | b9a79bc0202072aeda560d13ff71dae4ea49721c (patch) | |
tree | b5dabdf571901a2c410265883636661848a7754d /io.c | |
parent | ab0c37d0cfdeff23a8392c71cbe7e8ea1bc0ac5c (diff) | |
download | ruby-b9a79bc0202072aeda560d13ff71dae4ea49721c.tar.gz |
* io.c (rb_f_backquote): need not to check nil result.
[ruby-core:02078]
* io.c (rb_io_getline): should return nil on eof, even when nil rs is
specified. [ruby-core:02077]
* pack.c (pack_pack): add sign check for 'i', and 'l'.
[ruby-dev:22427]
* bignum.c (rb_quad_pack): add range check for 'quad int'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5308 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -1027,6 +1027,7 @@ rb_io_getline(rs, fptr) rb_io_check_readable(fptr); if (NIL_P(rs)) { + if (feof(fptr->f)) return Qnil; str = read_all(fptr, 0, Qnil); } else if (rs == rb_default_rs) { @@ -3223,10 +3224,8 @@ rb_f_backquote(obj, str) GetOpenFile(port, fptr); result = read_all(fptr, remain_size(fptr), Qnil); - rb_io_close(port); - if (NIL_P(result)) return rb_str_new(0,0); return result; } |