From b55ff9989153cbe786967d8a1382846059fd2c54 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 24 May 2009 13:39:35 +0000 Subject: [PATCH] * error.c (syserr_initialize): errno is int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ error.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 218f016eb7..eb109cafa5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Sun May 24 22:39:33 2009 Nobuyoshi Nakada + + * error.c (syserr_initialize): errno is int. + Sun May 24 00:52:54 2009 Yuki Sonoda (Yugui) * configure.in ($ridir): new configuration. [ruby-core:23520]. 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;