ruby-changes:5547
From: shyouhei <ko1@a...>
Date: Mon, 9 Jun 2008 18:11:45 +0900 (JST)
Subject: [ruby-changes:5547] Ruby:r17049 (ruby_1_8_6): merge revision(s) 15054:
shyouhei 2008-06-09 18:11:31 +0900 (Mon, 09 Jun 2008) New Revision: 17049 Modified files: branches/ruby_1_8_6/ChangeLog branches/ruby_1_8_6/eval.c branches/ruby_1_8_6/version.h Log: merge revision(s) 15054: * eval.c (eval): check if backtrace is empty. [ruby-core:15040] http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/ChangeLog?r1=17049&r2=17048&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/version.h?r1=17049&r2=17048&diff_format=u http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/eval.c?r1=17049&r2=17048&diff_format=u Index: ruby_1_8_6/ChangeLog =================================================================== --- ruby_1_8_6/ChangeLog (revision 17048) +++ ruby_1_8_6/ChangeLog (revision 17049) @@ -1,3 +1,7 @@ +Mon Jun 9 18:09:20 2008 Nobuyoshi Nakada <nobu@r...> + + * eval.c (eval): check if backtrace is empty. [ruby-core:15040] + Sun Jun 8 06:08:26 2008 Nobuyoshi Nakada <nobu@r...> * eval.c (rb_define_alloc_func, rb_undef_alloc_func): should Index: ruby_1_8_6/version.h =================================================================== --- ruby_1_8_6/version.h (revision 17048) +++ ruby_1_8_6/version.h (revision 17049) @@ -1,15 +1,15 @@ #define RUBY_VERSION "1.8.6" -#define RUBY_RELEASE_DATE "2008-06-08" +#define RUBY_RELEASE_DATE "2008-06-09" #define RUBY_VERSION_CODE 186 -#define RUBY_RELEASE_CODE 20080608 -#define RUBY_PATCHLEVEL 166 +#define RUBY_RELEASE_CODE 20080609 +#define RUBY_PATCHLEVEL 167 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 #define RUBY_VERSION_TEENY 6 #define RUBY_RELEASE_YEAR 2008 #define RUBY_RELEASE_MONTH 6 -#define RUBY_RELEASE_DAY 8 +#define RUBY_RELEASE_DAY 9 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[]; Index: ruby_1_8_6/eval.c =================================================================== --- ruby_1_8_6/eval.c (revision 17048) +++ ruby_1_8_6/eval.c (revision 17049) @@ -6534,16 +6534,17 @@ if (state) { if (state == TAG_RAISE) { if (strcmp(file, "(eval)") == 0) { - VALUE mesg, errat; + VALUE mesg, errat, bt2; errat = get_backtrace(ruby_errinfo); - mesg = rb_attr_get(ruby_errinfo, rb_intern("mesg")); - if (!NIL_P(errat) && TYPE(errat) == T_ARRAY) { + mesg = rb_attr_get(ruby_errinfo, rb_intern("mesg")); + if (!NIL_P(errat) && TYPE(errat) == T_ARRAY && + (bt2 = backtrace(-2), RARRAY(bt2)->len > 0)) { if (!NIL_P(mesg) && TYPE(mesg) == T_STRING) { rb_str_update(mesg, 0, 0, rb_str_new2(": ")); rb_str_update(mesg, 0, 0, RARRAY(errat)->ptr[0]); } - RARRAY(errat)->ptr[0] = RARRAY(backtrace(-2))->ptr[0]; + RARRAY(errat)->ptr[0] = RARRAY(bt2)->ptr[0]; } } rb_exc_raise(ruby_errinfo); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/