ruby-changes:9048
From: matz <ko1@a...>
Date: Tue, 9 Dec 2008 01:48:01 +0900 (JST)
Subject: [ruby-changes:9048] Ruby:r20585 (trunk): * eval.c (rb_make_exception): single argument to raise may be
matz 2008-12-09 01:47:47 +0900 (Tue, 09 Dec 2008) New Revision: 20585 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20585 Log: * eval.c (rb_make_exception): single argument to raise may be string compatible object. Modified files: trunk/ChangeLog trunk/eval.c Index: ChangeLog =================================================================== --- ChangeLog (revision 20584) +++ ChangeLog (revision 20585) @@ -72,6 +72,11 @@ * pack.c (pack_unpack): ditto. +Fri Dec 5 22:56:24 2008 Yukihiro Matsumoto <matz@r...> + + * eval.c (rb_make_exception): single argument to raise may be + string compatible object. + Fri Dec 5 21:45:45 2008 Tadayoshi Funaba <tadf@d...> * rational.c (nurat_{to_s,inspect}): performance improvement. Index: eval.c =================================================================== --- eval.c (revision 20584) +++ eval.c (revision 20585) @@ -477,13 +477,13 @@ 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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/