summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-20 18:10:09 (GMT)
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-06-20 18:10:09 (GMT)
commit331f46a25063c8320ac6f6ad023c3edacedb36f1 (patch)
tree28aa0558f3e3782545d34d5fab5209b0e3076afa /vm_insnhelper.c
parent2b5a801c1bdb531121d9ef6c8e053cd345f32bd9 (diff)
add assertion to vm_search_method()
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 57e5499..1f22cc6 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -1318,6 +1318,9 @@ vm_search_method(const struct rb_call_info *ci, struct rb_call_cache *cc, VALUE
{
VALUE klass = CLASS_OF(recv);
+ VM_ASSERT(klass != Qfalse);
+ VM_ASSERT(RBASIC_CLASS(klass) == 0 || rb_obj_is_kind_of(klass, rb_cClass));
+
#if OPT_INLINE_METHOD_CACHE
if (LIKELY(RB_DEBUG_COUNTER_INC_UNLESS(mc_global_state_miss,
GET_GLOBAL_METHOD_STATE() == cc->method_state) &&