aboutsummaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-31 01:02:26 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-31 01:02:26 +0000
commit43886f3804567d8330eb3797d40065e0e7001cf5 (patch)
tree2ecaaf2cb405cdf4bdcbf420966fc3213c44a322 /eval.c
parent4726e6349ace31e28460725ef542b481fc2ea3ca (diff)
downloadruby-43886f3804567d8330eb3797d40065e0e7001cf5.tar.gz
use rb_source_loc and rb_source_location
* error.c, eval.c, eval_error.c, gc.c, variable.c, vm.c, vm_eval.c, vm_trace.c: use rb_source_loc/rb_source_location instead of combination of rb_sourcefile/rb_sourcefilename and rb_sourceline. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/eval.c b/eval.c
index f598525261..e7f95deadb 100644
--- a/eval.c
+++ b/eval.c
@@ -476,7 +476,7 @@ setup_exception(rb_thread_t *th, int tag, volatile VALUE mesg, VALUE cause)
{
VALUE e;
const char *file = 0;
- volatile int line = 0;
+ int line;
int nocause = 0;
if (NIL_P(mesg)) {
@@ -493,8 +493,7 @@ setup_exception(rb_thread_t *th, int tag, volatile VALUE mesg, VALUE cause)
}
exc_setup_cause(mesg, cause);
- file = rb_sourcefile();
- if (file) line = rb_sourceline();
+ file = rb_source_loc(&line);
if (file && !NIL_P(mesg)) {
VALUE at;
if (sysstack_error_p(mesg)) {