diff options
Diffstat (limited to 'vm_method.c')
-rw-r--r-- | vm_method.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vm_method.c b/vm_method.c index 33e90cf9f1..8aea9b54cc 100644 --- a/vm_method.c +++ b/vm_method.c @@ -563,9 +563,9 @@ rb_method_entry_make(VALUE klass, ID mid, VALUE defined_class, rb_method_visibil default: break; } - if (iseq && !NIL_P(iseq->body->location.path)) { - int line = iseq->body->line_info_table ? FIX2INT(rb_iseq_first_lineno(iseq)) : 0; - rb_compile_warning(RSTRING_PTR(iseq->body->location.path), line, + if (iseq) { + rb_compile_warning(RSTRING_PTR(iseq->body->location.path), + FIX2INT(iseq->body->location.first_lineno), "previous definition of %"PRIsVALUE" was here", rb_id2str(old_def->original_id)); } |