summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTomoyuki Sahara <[email protected]>2015-10-20 15:39:28 +0900
committerTomoyuki Sahara <[email protected]>2015-10-20 15:40:25 +0900
commitdb7d82967944fca2ef3581a5a5d3417c807b8efc (patch)
tree0d544d19db4cbed0ef820d1626f3ecc0f8f2c610
parent21963f8fa1b3ac5c1896fcc13157fdc70b4d9349 (diff)
downloadmruby-db7d82967944fca2ef3581a5a5d3417c807b8efc.tar.gz
mruby-db7d82967944fca2ef3581a5a5d3417c807b8efc.zip
raise a SystemCallError when lseek(2) fails.
-rw-r--r--src/io.c2
1 files changed, 1 insertions, 1 deletions
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);