Skip to content

Commit 1aba398

Browse files
author
matz
committed
syscall bug
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1 parent 2a7104f commit 1aba398

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

io.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,7 @@ argf_set_lineno(argf, val)
707707
{
708708
gets_lineno = NUM2INT(val);
709709
lineno = INT2FIX(gets_lineno);
710+
return Qnil;
710711
}
711712

712713
static VALUE
@@ -865,8 +866,6 @@ static void
865866
rb_io_fptr_close(fptr)
866867
OpenFile *fptr;
867868
{
868-
int fd;
869-
870869
if (fptr->f == NULL && fptr->f2 == NULL) return;
871870
rb_thread_fd_close(fileno(fptr->f));
872871

@@ -2322,7 +2321,6 @@ rb_f_select(argc, argv, obj)
23222321
int i, max = 0, n;
23232322
int interrupt_flag = 0;
23242323
int pending = 0;
2325-
VALUE io;
23262324

23272325
rb_scan_args(argc, argv, "13", &read, &write, &except, &timeout);
23282326
if (NIL_P(timeout)) {
@@ -2640,8 +2638,8 @@ rb_f_syscall(argc, argv)
26402638
#endif /* atarist */
26412639
}
26422640
TRAP_END;
2643-
if (retval == -1) rb_sys_fail(0);
2644-
return INT2FIX(0);
2641+
if (retval < 0) rb_sys_fail(0);
2642+
return INT2NUM(retval);
26452643
#else
26462644
rb_notimplement();
26472645
return Qnil; /* not reached */

0 commit comments

Comments
 (0)