summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-09 09:08:55 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-09 09:08:55 +0000
commit27ce75e7e63aac57fd2ed50b9f03b946ffb2cc7e (patch)
treea7998fb3885503954378fbfa3a14a81c1ab25f45
parent66de1c49105ea8fcfb1e48d61cc6699bacaf6db8 (diff)
downloadruby-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--ChangeLog4
-rw-r--r--eval.c9
-rw-r--r--version.h8
3 files changed, 13 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 655d8a164f..c4308ab08e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/eval.c b/eval.c
index 14d4d8d62f..e0a7e17af6 100644
--- a/eval.c
+++ b/eval.c
@@ -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);
diff --git a/version.h b/version.h
index c8af3f8b02..c49a6cac87 100644
--- a/version.h
+++ b/version.h
@@ -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[];