diff options
author | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-09 09:08:55 +0000 |
---|---|---|
committer | shyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-09 09:08:55 +0000 |
commit | 27ce75e7e63aac57fd2ed50b9f03b946ffb2cc7e (patch) | |
tree | a7998fb3885503954378fbfa3a14a81c1ab25f45 | |
parent | 66de1c49105ea8fcfb1e48d61cc6699bacaf6db8 (diff) | |
download | ruby-27ce75e7e63aac57fd2ed50b9f03b946ffb2cc7e.tar.gz |
merge revision(s) 15054:
* eval.c (eval): check if backtrace is empty. [ruby-core:15040]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@17047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | eval.c | 9 | ||||
-rw-r--r-- | version.h | 8 |
3 files changed, 13 insertions, 8 deletions
@@ -1,3 +1,7 @@ +Mon Jun 9 18:03:32 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * eval.c (eval): check if backtrace is empty. [ruby-core:15040] + Sun Jun 8 06:07:02 2008 Nobuyoshi Nakada <nobu@ruby-lang.org> * eval.c (rb_define_alloc_func, rb_undef_alloc_func): should @@ -6491,16 +6491,17 @@ eval(self, src, scope, file, line) 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); @@ -1,15 +1,15 @@ #define RUBY_VERSION "1.8.5" -#define RUBY_RELEASE_DATE "2008-06-08" +#define RUBY_RELEASE_DATE "2008-06-09" #define RUBY_VERSION_CODE 185 -#define RUBY_RELEASE_CODE 20080608 -#define RUBY_PATCHLEVEL 165 +#define RUBY_RELEASE_CODE 20080609 +#define RUBY_PATCHLEVEL 166 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 #define RUBY_VERSION_TEENY 5 #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[]; |