summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--error.c7
-rw-r--r--sample/test.rb3
3 files changed, 13 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index ac9afe9..bc89a69 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed May 21 23:07:08 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * error.c (rb_sys_fail): should not specify errno explicitly.
+ [ruby-dev:20264]
+
Thu May 22 02:46:38 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* eval.c (rb_eval): splat NODE_RESTARY. [ruby-dev:20268]
@@ -17,6 +22,11 @@ Thu May 22 01:11:15 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* parse.y (yylex): slight optimization.
+Wed May 21 23:07:08 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * error.c (rb_sys_fail): should not specify errno explicitly.
+ [ruby-dev:20264]
+
Wed May 21 20:51:47 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
* Makefile.in, bcc32/Makefile.sub, win32/Makefile.sub,
diff --git a/error.c b/error.c
index a90167c..e2d1430 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
diff --git a/sample/test.rb b/sample/test.rb
index 1067a95..7f50141 100644
--- a/sample/test.rb
+++ b/sample/test.rb
@@ -109,7 +109,6 @@ a,b,*c = *[*[]]; test_ok([a,b,c] == [nil,nil,[]])
a,b,*c = *[*[1]]; test_ok([a,b,c] == [1,nil,[]])
a,b,*c = *[*[1,2]]; test_ok([a,b,c] == [1,2,[]])
-def f; yield; end; f {|a| test_ok(a == nil)}
def f; yield nil; end; f {|a| test_ok(a == nil)}
def f; yield 1; end; f {|a| test_ok(a == 1)}
def f; yield []; end; f {|a| test_ok(a == [])}
@@ -122,11 +121,9 @@ def f; yield [*[1,2]]; end; f {|a| test_ok(a == [1,2])}
def f; yield *nil; end; f {|a| test_ok(a == nil)}
def f; yield *1; end; f {|a| test_ok(a == 1)}
-def f; yield *[]; end; f {|a| test_ok(a == nil)}
def f; yield *[1]; end; f {|a| test_ok(a == 1)}
def f; yield *[nil]; end; f {|a| test_ok(a == nil)}
def f; yield *[[]]; end; f {|a| test_ok(a == [])}
-def f; yield *[*[]]; end; f {|a| test_ok(a == nil)}
def f; yield *[*[1]]; end; f {|a| test_ok(a == 1)}
def f; yield *[*[1,2]]; end; f {|a| test_ok(a == [1,2])}