1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

rb_method_attr_t::location should be 0 or others.

method_def_location() expects that rb_method_attr_t::location
is 0 (Qfalse) or not.
This commit is contained in:
Koichi Sasada 2019-09-30 14:27:02 +09:00
parent 649a64ae29
commit 8ba48c1b85

View file

@ -285,10 +285,10 @@ the_location(void)
int line;
if (!cfp) {
return Qnil;
return Qfalse;
}
else if (! (line = rb_vm_get_sourceline(cfp))) {
return Qnil;
return Qfalse;
}
else {
VALUE loc = rb_ary_new3(2, rb_iseq_path(cfp->iseq), INT2FIX(line));