summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-22 01:57:22 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-08-22 01:57:22 +0000
commit1a68238e695ade157853de3bc1f92374dbc50497 (patch)
treec474a35455785e37ba52fe69d0d6d6f641dbba0b
parent78cc8cc1c4d2642e3a234cc1874e26cb258dec50 (diff)
* eval.c (get_backtrace): check the result more.
[ruby-dev:31261] [ruby-bugs-12398] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13190 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--error.c12
-rw-r--r--eval.c4
-rw-r--r--version.h2
4 files changed, 15 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 300c951..3d2288c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Aug 22 10:55:00 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * eval.c (get_backtrace): check the result more.
+ [ruby-dev:31261] [ruby-bugs-12398]
+
Wed Aug 22 10:36:15 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* bignum.c (rb_big_lshift, rb_big_rshift): separated functions
diff --git a/error.c b/error.c
index 44e7092..608d1fa 100644
--- a/error.c
+++ b/error.c
@@ -488,14 +488,14 @@ static VALUE
exc_backtrace(exc)
VALUE exc;
{
- ID bt = rb_intern("bt");
+ static ID bt;
- if (!rb_ivar_defined(exc, bt)) return Qnil;
- return rb_ivar_get(exc, bt);
+ if (!bt) bt = rb_intern("bt");
+ return rb_attr_get(exc, bt);
}
-static VALUE
-check_backtrace(bt)
+VALUE
+rb_check_backtrace(bt)
VALUE bt;
{
long i;
@@ -532,7 +532,7 @@ exc_set_backtrace(exc, bt)
VALUE exc;
VALUE bt;
{
- return rb_iv_set(exc, "bt", check_backtrace(bt));
+ return rb_iv_set(exc, "bt", rb_check_backtrace(bt));
}
/*
diff --git a/eval.c b/eval.c
index d5e050b..fa0ed97 100644
--- a/eval.c
+++ b/eval.c
@@ -1197,6 +1197,8 @@ error_pos()
}
}
+VALUE rb_check_backtrace(VALUE);
+
static VALUE
get_backtrace(info)
VALUE info;
@@ -1204,7 +1206,7 @@ get_backtrace(info)
if (NIL_P(info)) return Qnil;
info = rb_funcall(info, rb_intern("backtrace"), 0);
if (NIL_P(info)) return Qnil;
- return rb_check_array_type(info);
+ return rb_check_backtrace(info);
}
static void
diff --git a/version.h b/version.h
index 4f3a61a..8a8dbfd 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2007-08-22"
#define RUBY_VERSION_CODE 186
#define RUBY_RELEASE_CODE 20070822
-#define RUBY_PATCHLEVEL 71
+#define RUBY_PATCHLEVEL 72
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8