From 1aba398e29bd9134f83c165a2495883f72cbbb3d Mon Sep 17 00:00:00 2001 From: matz Date: Tue, 25 May 1999 07:28:31 +0000 Subject: [PATCH] syscall bug git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- io.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/io.c b/io.c index 0d1e98403edd03..4c63d8364821e4 100644 --- a/io.c +++ b/io.c @@ -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 */