aboutsummaryrefslogtreecommitdiffstats
path: root/vm.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
commit1546ffed499aa40e905485b00293fbb530d7ebd1 (patch)
tree2ecaaf2cb405cdf4bdcbf420966fc3213c44a322 /vm.c
parent954224f3c53a66004c7171c139b1a45668d91858 (diff)
downloadruby-1546ffed499aa40e905485b00293fbb530d7ebd1.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 'vm.c')
-rw-r--r--vm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/vm.c b/vm.c
index d79d38a8d9..1e2b4dc1c4 100644
--- a/vm.c
+++ b/vm.c
@@ -203,16 +203,14 @@ ruby_th_dtrace_setup(rb_thread_t *th, VALUE klass, ID id,
type = BUILTIN_TYPE(klass);
if (type == T_CLASS || type == T_ICLASS || type == T_MODULE) {
VALUE name = rb_class_path_no_cache(klass);
- const char *classname;
+ const char *classname, *filename;
const char *methodname = rb_id2name(id);
- const char *filename = rb_sourcefile();
- if (methodname && filename) {
+ if (methodname && (filename = rb_source_loc(&args->line_no)) != 0) {
if (NIL_P(name) || !(classname = StringValuePtr(name)))
classname = "<unknown>";
args->classname = classname;
args->methodname = methodname;
args->filename = filename;
- args->line_no = rb_sourceline();
args->klass = klass;
args->name = name;
return TRUE;