summaryrefslogtreecommitdiff
path: root/vm_method.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-11 18:58:11 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-08-11 18:58:11 +0000
commit8dc8bba42d63b5ada216f94b85f8dceb72e266a8 (patch)
treeedd024d3b69f60b11e3bcdf0e1aea32846e022c0 /vm_method.c
parent717f31e0756ac0f7c1e0c47c7a91356d0cbccc71 (diff)
merge revision(s) 54142,55500: [Backport #12353]
assertions.rb: fix result of assert_nothing_raised * test/lib/test/unit/assertions.rb (assert_nothing_raised): do not discard the result of the given block. * 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/branches/ruby_2_3@55869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_method.c')
-rw-r--r--vm_method.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_method.c b/vm_method.c
index 24f37dc85f..7f4af53518 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;
}