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 | 891eb99eb4ad819ab17033707ecffff117b3a066 (patch) | |
| tree | b5dabdf571901a2c410265883636661848a7754d /io.c | |
| parent | b28547678ed616bddbdba21d5ff66c42eba6d4de (diff) | |
| download | ruby-891eb99eb4ad819ab17033707ecffff117b3a066.tar.gz ruby-891eb99eb4ad819ab17033707ecffff117b3a066.tar.xz ruby-891eb99eb4ad819ab17033707ecffff117b3a066.zip | |
* 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: http://svn.ruby-lang.org/repos/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; } |
