summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
Diffstat (limited to 'error.c')
-rw-r--r--error.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/error.c b/error.c
index 4c23894f36..07a72a9a94 100644
--- a/error.c
+++ b/error.c
@@ -949,7 +949,7 @@ syserr_initialize(int argc, VALUE *argv, VALUE self)
rb_scan_args(argc, argv, "01", &mesg);
error = rb_const_get(klass, rb_intern("Errno"));
}
- if (!NIL_P(error)) err = strerror(NUM2LONG(error));
+ if (!NIL_P(error)) err = strerror(NUM2INT(error));
else err = "unknown error";
if (!NIL_P(mesg)) {
VALUE str = mesg;