summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index c14f05e3aa..a0f63dfbc4 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -3265,16 +3265,13 @@ vm_opt_newarray_min(rb_num_t num, const VALUE *ptr)
#undef id_cmp
-static VALUE
+static int
vm_ic_hit_p(IC ic, const VALUE *reg_ep)
{
- if (ic->ic_serial == GET_GLOBAL_CONSTANT_STATE() &&
- (ic->ic_cref == NULL || ic->ic_cref == rb_vm_get_cref(reg_ep))) {
- return ic->ic_value.value;
- }
- else {
- return Qnil;
+ if (ic->ic_serial == GET_GLOBAL_CONSTANT_STATE()) {
+ return (ic->ic_cref == NULL || ic->ic_cref == rb_vm_get_cref(reg_ep));
}
+ return FALSE;
}
static void