ruby-changes:2414
From: ko1@a...
Date: 13 Nov 2007 15:24:19 +0900
Subject: [ruby-changes:2414] ko1 - Ruby:r13905 (trunk): * compile.c (iseq_specialized_instruction): check argc.
ko1 2007-11-13 15:24:06 +0900 (Tue, 13 Nov 2007) New Revision: 13905 Modified files: trunk/ChangeLog trunk/compile.c Log: * compile.c (iseq_specialized_instruction): check argc. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/compile.c?r1=13905&r2=13904 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13905&r2=13904 Index: ChangeLog =================================================================== --- ChangeLog (revision 13904) +++ ChangeLog (revision 13905) @@ -1,3 +1,7 @@ +Tue Nov 13 15:21:52 2007 Koichi Sasada <ko1@a...> + + * compile.c (iseq_specialized_instruction): check argc. + Tue Nov 13 14:44:32 2007 why the lucky stiff <why@r...> * test/yaml/test_yaml.rb: fixed the failing YAML Struct test Index: compile.c =================================================================== --- compile.c (revision 13904) +++ compile.c (revision 13905) @@ -1482,14 +1482,16 @@ } } - if (mid == idSend || mid == id__send || - mid == idSendBang || - mid == id__send__ ) { - OPERAND_AT(iobj, 3) |= INT2FIX(VM_CALL_SEND_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); + } } - if (mid == idSendBang) { - OPERAND_AT(iobj, 3) |= INT2FIX(VM_CALL_SEND_BANG_BIT); - } } return COMPILE_OK; } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml