aboutsummaryrefslogtreecommitdiffstats
path: root/compile.c
diff options
context:
space:
mode:
Diffstat (limited to 'compile.c')
-rw-r--r--compile.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/compile.c b/compile.c
index 523c753dce..810fb0e59e 100644
--- a/compile.c
+++ b/compile.c
@@ -1482,13 +1482,15 @@ iseq_specialized_instruction(rb_iseq_t *iseq, INSN *iobj)
}
}
- if (mid == idSend || mid == id__send ||
- mid == idSendBang ||
- mid == id__send__ ) {
- OPERAND_AT(iobj, 3) |= INT2FIX(VM_CALL_SEND_BIT);
- }
- if (mid == idSendBang) {
- OPERAND_AT(iobj, 3) |= INT2FIX(VM_CALL_SEND_BANG_BIT);
+ if (argc > 0) {
+ if (mid == idSend || mid == id__send ||
+ mid == idSendBang ||
+ mid == id__send__ ) {
+ OPERAND_AT(iobj, 3) |= INT2FIX(VM_CALL_SEND_BIT);
+ }
+ if (mid == idSendBang) {
+ OPERAND_AT(iobj, 3) |= INT2FIX(VM_CALL_SEND_BANG_BIT);
+ }
}
}
return COMPILE_OK;