From ad4213d6feaa3f8c79b4c3de6753b11ae2d46a84 Mon Sep 17 00:00:00 2001
From: ko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>
Date: Sat, 6 Jan 2007 04:48:11 +0000
Subject: * insns.def (send) : fix to optimize send() with Symbol. *
 yarvtest/test_method.rb : add another test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
---
 insns.def | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'insns.def')

diff --git a/insns.def b/insns.def
index 0e5ec71185..2f2b399a12 100644
--- a/insns.def
+++ b/insns.def
@@ -1180,7 +1180,8 @@ send
 
 	if (node->nd_cfnc == rb_f_funcall || node->nd_cfnc == rb_f_send) {
 	    int i;
-	    id = rb_to_id(TOPN(num - 1));
+	    VALUE sym = TOPN(num - 1);
+	    id = SYMBOL_P(sym) ? SYM2ID(sym) : rb_to_id(sym);
 
 	    /* shift arguments */
 	    for (i=1; i<num; i++) {
-- 
cgit v1.2.3

