summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-04 19:45:16 +0000
committermarcandre <marcandre@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-02-04 19:45:16 +0000
commit1fd6ab5bab06305e70a167be2c7bc8900f58cbf6 (patch)
tree30206868c5d8c65ba868c88f021a26f6fb8694b7
parent18eef0b9beabf6e332afcc1ac9f8edaabc343560 (diff)
* vm_insnhelper.c: Revert r49500 (6ae6a8c7bc86e97)
Creates a regression in test_drb. Above my rubyfu. [#10828] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/ruby/test_symbol.rb4
-rw-r--r--vm_insnhelper.c17
2 files changed, 10 insertions, 11 deletions
diff --git a/test/ruby/test_symbol.rb b/test/ruby/test_symbol.rb
index d1a4cec532..6606b51112 100644
--- a/test/ruby/test_symbol.rb
+++ b/test/ruby/test_symbol.rb
@@ -265,7 +265,7 @@ class TestSymbol < Test::Unit::TestCase
assert_no_immortal_symbol_created do
10.times { |i| x.send "send should not leak #{i} - str mm" }
end
- end
+ end if false
def test_symbol_send_leak_symbol_custom_method_missing
x = Object.new
@@ -273,7 +273,7 @@ class TestSymbol < Test::Unit::TestCase
assert_no_immortal_symbol_created do
10.times { |i| x.send "send should not leak #{i} - sym mm".to_sym }
end
- end
+ end if false
def test_symbol_send_leak_string_no_optimization
assert_no_immortal_symbol_created do
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index a65ba9129d..84c2ca2ae6 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -1531,17 +1531,16 @@ vm_call_opt_send(rb_thread_t *th, rb_control_frame_t *reg_cfp, rb_call_info_t *c
VALUE exc = make_no_method_exception(rb_eNoMethodError, NULL, ci->recv, rb_long2int(ci->argc), &TOPN(i));
rb_exc_raise(exc);
}
- ci->mid = idMethodMissing;
- th->method_missing_reason = ci->aux.missing_reason = NOEX_VCALL;
- } else {
- /* shift arguments */
- if (i > 0) {
- MEMMOVE(&TOPN(i), &TOPN(i-1), VALUE, i);
- }
- ci->argc -= 1;
- DEC_SP(1);
+ ci->mid = rb_to_id(sym);
+ }
+
+ /* shift arguments */
+ if (i > 0) {
+ MEMMOVE(&TOPN(i), &TOPN(i-1), VALUE, i);
}
ci->me = rb_method_entry_without_refinements(CLASS_OF(ci->recv), ci->mid, &ci->defined_class);
+ ci->argc -= 1;
+ DEC_SP(1);
ci->flag = VM_CALL_FCALL | VM_CALL_OPT_SEND;