summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-21 18:04:11 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-05-21 18:04:11 +0000
commit9cf879d7a5f27d1965c99196c6364936f95b256d (patch)
tree052ad936423556c9df40d190bdaee472899d4932 /error.c
parent63a5a45a01b656adbc0457036a0f575b847b2a08 (diff)
* error.c (rb_sys_fail): should not specify errno explicitly.
[ruby-dev:20264] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'error.c')
-rw-r--r--error.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/error.c b/error.c
index a90167cf2e..e2d14304db 100644
--- a/error.c
+++ b/error.c
@@ -727,16 +727,15 @@ rb_sys_fail(mesg)
{
extern int errno;
int n = errno;
- VALUE argv[2];
+ VALUE arg;
errno = 0;
if (n == 0) {
rb_bug("rb_sys_fail() - errno == 0");
}
- argv[0] = mesg ? rb_str_new2(mesg) : Qnil;
- argv[1] = INT2NUM(n);
- rb_exc_raise(rb_class_new_instance(2, argv, get_syserr(n)));
+ arg = mesg ? rb_str_new2(mesg) : Qnil;
+ rb_exc_raise(rb_class_new_instance(1, &arg, get_syserr(n)));
}
void