From b51174a6b0997467d02242d6ca5dd08c43d45fa8 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 24 Jun 2016 17:33:35 +0000 Subject: No respond_to? as if the default definition * vm_method.c (vm_respond_to): try method_missing if respond_to? is undefined, as if it is the default definition. [ruby-core:75377] [Bug #12353] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55500 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 90d543793a..96fc4b6855 100644 --- a/vm_method.c +++ b/vm_method.c @@ -1916,7 +1916,7 @@ vm_respond_to(rb_thread_t *th, VALUE klass, VALUE obj, ID id, int priv) const rb_method_entry_t *const me = method_entry_get(klass, resid, &defined_class); - if (!me) return TRUE; + if (!me) return -1; if (METHOD_ENTRY_BASIC(me)) { return -1; } -- cgit v1.2.3