summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-19 10:24:17 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-07-19 10:24:17 +0000
commitf47618f89be183e826c79ac09988e274762a87c1 (patch)
tree7bdea814d6feb76f821eae3a8260d3fe99ea00cf /error.c
parent9bf8a375721ab809c3ad80407068ca6fad534c42 (diff)
* eval_error.ci (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@12815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'error.c')
-rw-r--r--error.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/error.c b/error.c
index 44e709276f..608d1fa558 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));
}
/*