aboutsummaryrefslogtreecommitdiffstats
path: root/eval_error.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-13 05:25:53 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-11-13 05:25:53 +0000
commit7ce6de9328ad72903b1d8222bf838518c587b403 (patch)
tree82191fc7d8d514e5dd42b4ccc08b8eeb6b21b992 /eval_error.c
parent4977d359c20e8d95bd14b6a8993e6c65c2f526e6 (diff)
downloadruby-7ce6de9328ad72903b1d8222bf838518c587b403.tar.gz
error.c: rb_get_backtrace
* error.c (rb_get_backtrace): move from eval_error.c to call exc_backtrace directly. [ruby-core:78097] [Bug #12925] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval_error.c')
-rw-r--r--eval_error.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/eval_error.c b/eval_error.c
index cfb82d3a24..c469474159 100644
--- a/eval_error.c
+++ b/eval_error.c
@@ -49,23 +49,6 @@ error_pos_str(void)
return Qnil;
}
-static VALUE
-get_backtrace(VALUE info)
-{
- if (NIL_P(info))
- return Qnil;
- info = rb_funcall(info, rb_intern("backtrace"), 0);
- if (NIL_P(info))
- return Qnil;
- return rb_check_backtrace(info);
-}
-
-VALUE
-rb_get_backtrace(VALUE info)
-{
- return get_backtrace(info);
-}
-
static void
set_backtrace(VALUE info, VALUE bt)
{
@@ -80,7 +63,7 @@ set_backtrace(VALUE info, VALUE bt)
bt = rb_backtrace_to_str_ary(bt);
}
}
- rb_funcall(info, rb_intern("set_backtrace"), 1, bt);
+ rb_check_funcall(info, set_backtrace, 1, &bt);
}
static void
@@ -105,7 +88,7 @@ rb_threadptr_error_print(rb_thread_t *th, VALUE errinfo)
TH_PUSH_TAG(th);
if (TH_EXEC_TAG() == 0) {
- errat = get_backtrace(errinfo);
+ errat = rb_get_backtrace(errinfo);
}
else if (errat == Qundef) {
errat = Qnil;