From db7d82967944fca2ef3581a5a5d3417c807b8efc Mon Sep 17 00:00:00 2001 From: Tomoyuki Sahara Date: Tue, 20 Oct 2015 15:39:28 +0900 Subject: raise a SystemCallError when lseek(2) fails. --- src/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/io.c b/src/io.c index f1bc52d83..ae7402b02 100644 --- a/src/io.c +++ b/src/io.c @@ -535,7 +535,7 @@ mrb_io_sysseek(mrb_state *mrb, mrb_value io) fptr = (struct mrb_io *)mrb_get_datatype(mrb, io, &mrb_io_type); pos = lseek(fptr->fd, offset, whence); if (pos < 0) { - mrb_raise(mrb, E_IO_ERROR, "sysseek failed"); + mrb_sys_fail(mrb, "sysseek"); } return mrb_fixnum_value(pos); -- cgit v1.2.3