mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
52296cdee1
commit
ad4213d6fe
3 changed files with 16 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
Sat Jan 6 13:48:36 2007 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* insns.def (send) : fix to optimize send() with Symbol.
|
||||
|
||||
* yarvtest/test_method.rb : add another test.
|
||||
|
||||
Sat Jan 6 13:43:55 2007 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* common.mk : add PHONY dependency to some rules
|
||||
|
|
|
@ -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++) {
|
||||
|
|
|
@ -553,6 +553,14 @@ class TestMethod < YarvTestBase
|
|||
obj.send(:m, :x){}
|
||||
$r
|
||||
}
|
||||
ae %q{
|
||||
class C
|
||||
def send
|
||||
:ok
|
||||
end
|
||||
end
|
||||
C.new.send
|
||||
}
|
||||
end
|
||||
|
||||
def test_send_with_private
|
||||
|
|
Loading…
Reference in a new issue