Project

General

Profile

Feature #10396 ยป ruby.diff

jeremyevans0 (Jeremy Evans), 10/19/2014 01:11 AM

View differences:

variable.c
VALUE
rb_ivar_get(VALUE obj, ID id)
{
VALUE iv = rb_ivar_lookup(obj, id, Qundef);
if (iv == Qundef) {
rb_warning("instance variable %"PRIsVALUE" not initialized", QUOTE_ID(id));
iv = Qnil;
}
return iv;
return rb_ivar_lookup(obj, id, Qnil);
}
VALUE
vm_insnhelper.c
{
#if USE_IC_FOR_IVAR
if (RB_TYPE_P(obj, T_OBJECT)) {
VALUE val = Qundef;
VALUE val = Qnil;
VALUE klass = RBASIC(obj)->klass;
if (LIKELY((!is_attr && ic->ic_serial == RCLASS_SERIAL(klass)) ||
......
}
}
if (UNLIKELY(val == Qundef)) {
if (!is_attr) rb_warning("instance variable %s not initialized", rb_id2name(id));
val = Qnil;
}
return val;
}
#endif /* USE_IC_FOR_IVAR */
    (1-1/1)