diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-05-25 07:28:31 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-05-25 07:28:31 +0000 |
commit | 1aba398e29bd9134f83c165a2495883f72cbbb3d (patch) | |
tree | ff8421a5a553a02aa687ef5e0155a4812ebba482 /io.c | |
parent | 2a7104fb5ca6f52e895ad734f72f414ebff1bea5 (diff) |
syscall bug
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -707,6 +707,7 @@ argf_set_lineno(argf, val) { gets_lineno = NUM2INT(val); lineno = INT2FIX(gets_lineno); + return Qnil; } static VALUE @@ -865,8 +866,6 @@ static void rb_io_fptr_close(fptr) OpenFile *fptr; { - int fd; - if (fptr->f == NULL && fptr->f2 == NULL) return; rb_thread_fd_close(fileno(fptr->f)); @@ -2322,7 +2321,6 @@ rb_f_select(argc, argv, obj) int i, max = 0, n; int interrupt_flag = 0; int pending = 0; - VALUE io; rb_scan_args(argc, argv, "13", &read, &write, &except, &timeout); if (NIL_P(timeout)) { @@ -2640,8 +2638,8 @@ rb_f_syscall(argc, argv) #endif /* atarist */ } TRAP_END; - if (retval == -1) rb_sys_fail(0); - return INT2FIX(0); + if (retval < 0) rb_sys_fail(0); + return INT2NUM(retval); #else rb_notimplement(); return Qnil; /* not reached */ |