summaryrefslogtreecommitdiff
path: root/eval.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-13 04:31:06 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-12-13 04:31:06 +0000
commit0aed7c6874ba75f1a85899d0ed0ea07b24a9f3ef (patch)
tree71350c2b48c1b2defd672ed3f672d130a7e5ebc0 /eval.c
parent4547d773c2ea02864df5658a99d18718626e902d (diff)
* error.c: add Exception#backtrace_locations.
Now, there are no setter and independent from Exception#backtrace. [Feature #8960] * eval.c (setup_exception): set backtrace locations for `bt_location' special attribute. * vm_backtrace.c (rb_backtrace_to_location_ary): added. * internal.h: ditto. * test/ruby/test_backtrace.rb: add a test for Exception#backtrace_locations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44170 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/eval.c b/eval.c
index c92d05dc19..2882c57295 100644
--- a/eval.c
+++ b/eval.c
@@ -493,10 +493,12 @@ setup_exception(rb_thread_t *th, int tag, volatile VALUE mesg)
if (OBJ_FROZEN(mesg)) {
mesg = rb_obj_dup(mesg);
}
+ rb_iv_set(mesg, "bt_locations", at);
set_backtrace(mesg, at);
}
}
}
+
if (!NIL_P(mesg)) {
th->errinfo = mesg;
}