From: Nikolai Lugovoi Date: 2009-10-06T08:30:36+09:00 Subject: [ruby-core:25950] [Bug #2171] Kernel#respond_to_missing? Invoked for Unimplemented Methods Issue #2171 has been updated by Nikolai Lugovoi. Actually, i pasted wrong patch in previous message. This one is working and does not break as much -- using (ex & 0x7F): --- a/vm_method.c +++ b/vm_method.c @@ -512,7 +512,7 @@ rb_method_boundp(VALUE klass, ID id, int ex) rb_method_entry_t *me = rb_method_entry(klass, id); if (me != 0) { - if (ex && (me->flag & NOEX_PRIVATE)) { + if ((ex & 0x7f) && (me->flag & NOEX_PRIVATE)) { return FALSE; } if (!me->def) return 0; @@ -1153,7 +1153,7 @@ basic_obj_respond_to(VALUE obj, ID id, int pub) { VALUE klass = CLASS_OF(obj); - switch (rb_method_boundp(klass, id, pub|NOEX_RESPONDS)) { + switch (rb_method_boundp(klass, id, (pub & 0x7F)|NOEX_RESPONDS)) { case 2: return FALSE; case 0: ---------------------------------------- http://redmine.ruby-lang.org/issues/show/2171 ---------------------------------------- http://redmine.ruby-lang.org