mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
63a5a45a01
commit
9cf879d7a5
3 changed files with 13 additions and 7 deletions
10
ChangeLog
10
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>
|
Thu May 22 02:46:38 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
* eval.c (rb_eval): splat NODE_RESTARY. [ruby-dev:20268]
|
* 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.
|
* 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>
|
Wed May 21 20:51:47 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
* Makefile.in, bcc32/Makefile.sub, win32/Makefile.sub,
|
* Makefile.in, bcc32/Makefile.sub, win32/Makefile.sub,
|
||||||
|
|
7
error.c
7
error.c
|
@ -727,16 +727,15 @@ rb_sys_fail(mesg)
|
||||||
{
|
{
|
||||||
extern int errno;
|
extern int errno;
|
||||||
int n = errno;
|
int n = errno;
|
||||||
VALUE argv[2];
|
VALUE arg;
|
||||||
|
|
||||||
errno = 0;
|
errno = 0;
|
||||||
if (n == 0) {
|
if (n == 0) {
|
||||||
rb_bug("rb_sys_fail() - errno == 0");
|
rb_bug("rb_sys_fail() - errno == 0");
|
||||||
}
|
}
|
||||||
|
|
||||||
argv[0] = mesg ? rb_str_new2(mesg) : Qnil;
|
arg = mesg ? rb_str_new2(mesg) : Qnil;
|
||||||
argv[1] = INT2NUM(n);
|
rb_exc_raise(rb_class_new_instance(1, &arg, get_syserr(n)));
|
||||||
rb_exc_raise(rb_class_new_instance(2, argv, get_syserr(n)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -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]]; test_ok([a,b,c] == [1,nil,[]])
|
||||||
a,b,*c = *[*[1,2]]; test_ok([a,b,c] == [1,2,[]])
|
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 nil; end; f {|a| test_ok(a == nil)}
|
||||||
def f; yield 1; end; f {|a| test_ok(a == 1)}
|
def f; yield 1; end; f {|a| test_ok(a == 1)}
|
||||||
def f; yield []; end; f {|a| test_ok(a == [])}
|
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 *nil; end; f {|a| test_ok(a == nil)}
|
||||||
def f; yield *1; end; f {|a| test_ok(a == 1)}
|
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 *[1]; end; f {|a| test_ok(a == 1)}
|
||||||
def f; yield *[nil]; end; f {|a| test_ok(a == nil)}
|
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 == [])}
|
||||||
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]]; end; f {|a| test_ok(a == 1)}
|
||||||
def f; yield *[*[1,2]]; end; f {|a| test_ok(a == [1,2])}
|
def f; yield *[*[1,2]]; end; f {|a| test_ok(a == [1,2])}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue