From b55ff9989153cbe786967d8a1382846059fd2c54 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 24 May 2009 13:39:35 +0000 Subject: * error.c (syserr_initialize): errno is int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'error.c') 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; -- cgit v1.2.3