From 4631523baf082ed6d1224e5e39fc90979c02be8d Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 9 Oct 2009 14:52:02 +0000 Subject: * vm_method.c (rb_method_boundp): should exclude NOEX_RESPONDS. based on the patch from Nikolai Lugovoi. [ruby-core:25949] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm_method.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vm_method.c') diff --git a/vm_method.c b/vm_method.c index a31fb8b5ac..bed8e61bd6 100644 --- 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 & ~NOEX_RESPONDS) && (me->flag & NOEX_PRIVATE)) { return FALSE; } if (!me->def) return 0; -- cgit v1.2.3