From 0f34ff4614965a52dbaaff7456300b0a69db16ec Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 30 Jan 2014 08:43:04 +0000 Subject: [PATCH] vm_eval.c: omit klass * vm_eval.c (rb_search_method_entry): also Qfalse and Qnil are immediate values, so have no RBASIC. omit klass, which is 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_eval.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/vm_eval.c b/vm_eval.c index 6a659822a8..b5e72e64c0 100644 --- a/vm_eval.c +++ b/vm_eval.c @@ -487,19 +487,18 @@ rb_search_method_entry(VALUE recv, ID mid, VALUE *defined_class_ptr) VALUE klass = CLASS_OF(recv); if (!klass) { - VALUE flags, klass; - if (IMMEDIATE_P(recv)) { + VALUE flags; + if (SPECIAL_CONST_P(recv)) { rb_raise(rb_eNotImpError, "method `%"PRIsVALUE"' called on unexpected immediate object (%p)", rb_id2str(mid), (void *)recv); } flags = RBASIC(recv)->flags; - klass = RBASIC(recv)->klass; if (flags == 0) { rb_raise(rb_eNotImpError, "method `%"PRIsVALUE"' called on terminated object" - " (%p flags=0x%"PRIxVALUE" klass=0x%"PRIxVALUE")", - rb_id2str(mid), (void *)recv, flags, klass); + " (%p flags=0x%"PRIxVALUE")", + rb_id2str(mid), (void *)recv, flags); } else { int type = BUILTIN_TYPE(recv); @@ -507,18 +506,18 @@ rb_search_method_entry(VALUE recv, ID mid, VALUE *defined_class_ptr) if (typestr && T_OBJECT <= type && type < T_NIL) rb_raise(rb_eNotImpError, "method `%"PRIsVALUE"' called on hidden %s object" - " (%p flags=0x%"PRIxVALUE" klass=0x%"PRIxVALUE")", - rb_id2str(mid), typestr, (void *)recv, flags, klass); + " (%p flags=0x%"PRIxVALUE")", + rb_id2str(mid), typestr, (void *)recv, flags); if (typestr) rb_raise(rb_eNotImpError, "method `%"PRIsVALUE"' called on unexpected %s object" - " (%p flags=0x%"PRIxVALUE" klass=0x%"PRIxVALUE")", - rb_id2str(mid), typestr, (void *)recv, flags, klass); + " (%p flags=0x%"PRIxVALUE")", + rb_id2str(mid), typestr, (void *)recv, flags); else rb_raise(rb_eNotImpError, "method `%"PRIsVALUE"' called on broken T_???" "(0x%02x) object" - " (%p flags=0x%"PRIxVALUE" klass=0x%"PRIxVALUE")", - rb_id2str(mid), type, (void *)recv, flags, klass); + " (%p flags=0x%"PRIxVALUE")", + rb_id2str(mid), type, (void *)recv, flags); } } return rb_method_entry(klass, mid, defined_class_ptr);