mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* eval.c (rb_make_exception): single argument to raise may be
string compatible object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
70cf909fdd
commit
b16baa9272
2 changed files with 8 additions and 3 deletions
|
@ -72,6 +72,11 @@ Sat Dec 6 14:35:06 2008 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* pack.c (pack_unpack): ditto.
|
* pack.c (pack_unpack): ditto.
|
||||||
|
|
||||||
|
Fri Dec 5 22:56:24 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
|
* eval.c (rb_make_exception): single argument to raise may be
|
||||||
|
string compatible object.
|
||||||
|
|
||||||
Fri Dec 5 21:45:45 2008 Tadayoshi Funaba <tadf@dotrb.org>
|
Fri Dec 5 21:45:45 2008 Tadayoshi Funaba <tadf@dotrb.org>
|
||||||
|
|
||||||
* rational.c (nurat_{to_s,inspect}): performance improvement.
|
* rational.c (nurat_{to_s,inspect}): performance improvement.
|
||||||
|
|
6
eval.c
6
eval.c
|
@ -477,13 +477,13 @@ rb_make_exception(int argc, VALUE *argv)
|
||||||
mesg = Qnil;
|
mesg = Qnil;
|
||||||
switch (argc) {
|
switch (argc) {
|
||||||
case 0:
|
case 0:
|
||||||
mesg = Qnil;
|
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (NIL_P(argv[0]))
|
if (NIL_P(argv[0]))
|
||||||
break;
|
break;
|
||||||
if (TYPE(argv[0]) == T_STRING) {
|
mesg = rb_check_string_type(argv[0]);
|
||||||
mesg = rb_exc_new3(rb_eRuntimeError, argv[0]);
|
if (!NIL_P(mesg)) {
|
||||||
|
mesg = rb_exc_new3(rb_eRuntimeError, mesg);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
n = 0;
|
n = 0;
|
||||||
|
|
Loading…
Reference in a new issue