aboutsummaryrefslogtreecommitdiffstats
path: root/eval_error.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_error.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_error.c')
-rw-r--r--eval_error.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/eval_error.c b/eval_error.c
index 82a69033b6..395b9b0196 100644
--- a/eval_error.c
+++ b/eval_error.c
@@ -22,8 +22,8 @@ warn_printf(const char *fmt, ...)
static void
error_pos(void)
{
- VALUE sourcefile = rb_sourcefilename();
- int sourceline = rb_sourceline();
+ int sourceline;
+ VALUE sourcefile = rb_source_location(&sourceline);
if (sourcefile) {
ID caller_name;
@@ -105,8 +105,8 @@ error_print(void)
goto no_message;
}
if (NIL_P(errat)) {
- const char *file = rb_sourcefile();
- int line = rb_sourceline();
+ int line;
+ const char *file = rb_source_loc(&line);
if (!file)
warn_printf("%d", line);
else if (!line)