summaryrefslogtreecommitdiff
path: root/compile.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-13 06:24:06 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-13 06:24:06 +0000
commit65cb92fca34538ce3cb39ac91f9421674c57dfc5 (patch)
treef7053fe08d0ec01d9e30093b6f178a1dc7c3d7c6 /compile.c
parent69c1181a9f4ff295b3bcdb465979323533b50f65 (diff)
* compile.c (iseq_specialized_instruction): check argc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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;