summaryrefslogtreecommitdiffstats
path: root/error.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-24 13:39:35 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-05-24 13:39:35 +0000
commit560e2e2fbeb13e60c52160c0751094aea169f4e4 (patch)
tree32e62157503596d67bf2c18d5aacd7838c9bac0e /error.c
parentf70d909e7556914b5fac19bb552d8bf713fc6208 (diff)
downloadruby-560e2e2fbeb13e60c52160c0751094aea169f4e4.tar.gz
ruby-560e2e2fbeb13e60c52160c0751094aea169f4e4.tar.xz
ruby-560e2e2fbeb13e60c52160c0751094aea169f4e4.zip
* error.c (syserr_initialize): errno is int.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 4c23894f3..07a72a9a9 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;