diff options
Diffstat (limited to 'error.c')
-rw-r--r-- | error.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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)); } /* |