Skip to content

Commit

Permalink
* eval.c (rb_make_exception): single argument to raise may be
Browse files Browse the repository at this point in the history
  string compatible object.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20585 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
matz committed Dec 8, 2008
1 parent 70cf909 commit b16baa9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ Sat Dec 6 14:35:06 2008 NARUSE, Yui <naruse@ruby-lang.org>

* 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>

* rational.c (nurat_{to_s,inspect}): performance improvement.
Expand Down
6 changes: 3 additions & 3 deletions eval.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,13 +477,13 @@ rb_make_exception(int argc, VALUE *argv)
mesg = Qnil;
switch (argc) {
case 0:
mesg = Qnil;
break;
case 1:
if (NIL_P(argv[0]))
break;
if (TYPE(argv[0]) == T_STRING) {
mesg = rb_exc_new3(rb_eRuntimeError, argv[0]);
mesg = rb_check_string_type(argv[0]);
if (!NIL_P(mesg)) {
mesg = rb_exc_new3(rb_eRuntimeError, mesg);
break;
}
n = 0;
Expand Down

0 comments on commit b16baa9

Please sign in to comment.