summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/compile.c b/compile.c
index 490ddd5951..0585c294c1 100644
--- a/compile.c
+++ b/compile.c
@@ -2842,7 +2842,9 @@ iseq_peephole_optimize(rb_iseq_t *iseq, LINK_ELEMENT *list, const int do_tailcal
* =>
* send <:+@, 0, ARG_SIMPLE>
*/
- if ((ci->flag & VM_CALL_ARGS_SIMPLE) && ci->orig_argc == 0) {
+ if (ci->mid == idUPlus &&
+ (ci->flag & VM_CALL_ARGS_SIMPLE) &&
+ ci->orig_argc == 0) {
ELEM_REMOVE(list);
return COMPILE_OK;
}