summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-04 02:49:37 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-04 02:49:37 +0000
commitbac9f65f707e8ffcb79389e5b10b32addc94dc01 (patch)
tree0136380e9398eef3a5728564b83146aaafe58b68 /vm_method.c
parent81a0c608eb73f1a250ec9ec11107280b8d086ef8 (diff)
* vm_core.h (rb_location_t): fix type and field name.
(1) rename rb_location_t to rb_iseq_location_t. (2) rename field names of rb_iseq_location_t to adjust RubyVM::Backtrace::Location methods. (2-1) filename -> path (2-2) filepath -> absolute_path (2-3) basename -> base_label (2-4) name -> label (3) rename filed name rb_iseq_location_t#line_no to rb_iseq_location_t#first_lineno to clear purpose of this field. (4) The field names rb_binding_t#(filename|line_no) are also renamed to rb_binding_t#(path|first_lineno). * compile.c: apply above changes. * iseq.c: ditto. * proc.c: ditto. * vm*.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/vm_method.c b/vm_method.c
index a22c917880..673113eaa8 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -224,9 +224,9 @@ rb_method_entry_make(VALUE klass, ID mid, rb_method_type_t type,
default:
break;
}
- if (iseq && !NIL_P(iseq->location.filename)) {
+ if (iseq && !NIL_P(iseq->location.path)) {
int line = iseq->line_info_table ? rb_iseq_first_lineno(iseq) : 0;
- rb_compile_warning(RSTRING_PTR(iseq->location.filename), line,
+ rb_compile_warning(RSTRING_PTR(iseq->location.path), line,
"previous definition of %s was here",
rb_id2name(old_def->original_id));
}
@@ -307,7 +307,7 @@ rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *opts, rb_method_
th = GET_THREAD();
cfp = rb_vm_get_ruby_level_next_cfp(th, th->cfp);
if (cfp && (line = rb_vm_get_sourceline(cfp))) {
- VALUE location = rb_ary_new3(2, cfp->iseq->location.filename, INT2FIX(line));
+ VALUE location = rb_ary_new3(2, cfp->iseq->location.path, INT2FIX(line));
def->body.attr.location = rb_ary_freeze(location);
}
break;