ruby-changes:9139
From: yugui <ko1@a...>
Date: Fri, 12 Dec 2008 23:54:51 +0900 (JST)
Subject: [ruby-changes:9139] Ruby:r20676 (ruby_1_9_1): merges r20585 from trunk into ruby_1_9_1.
yugui 2008-12-12 23:54:24 +0900 (Fri, 12 Dec 2008) New Revision: 20676 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20676 Log: merges r20585 from trunk into ruby_1_9_1. * eval.c (rb_make_exception): single argument to raise may be string compatible object. Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/eval.c Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 20675) +++ ruby_1_9_1/ChangeLog (revision 20676) @@ -1,3 +1,8 @@ +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. + Tue Dec 9 00:54:01 2008 Nobuyoshi Nakada <nobu@r...> * tool/make-snapshot (package): enc.mk in snapshot is dummy and should Index: ruby_1_9_1/eval.c =================================================================== --- ruby_1_9_1/eval.c (revision 20675) +++ ruby_1_9_1/eval.c (revision 20676) @@ -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/