aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-31 04:54:45 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-10-31 04:54:45 +0000
commitc8caec546a13f70c266d02481b04dde4d7632dd7 (patch)
tree5c4cc602203267029f5a1d6a5c133573b39c60d6 /vm_insnhelper.c
parent1c89b6bd1fff6817e4c424cf365623913aa9e73b (diff)
downloadruby-c8caec546a13f70c266d02481b04dde4d7632dd7.tar.gz
vm_insnhelper.c: get rid of copying garbage
* vm_insnhelper.c (vm_call_method_missing): get rid of extra garbage after argv. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 9a615df26f..9f3c00d6c9 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -1919,8 +1919,8 @@ vm_call_method_missing(rb_thread_t *th, rb_control_frame_t *reg_cfp, struct rb_c
/* shift arguments: m(a, b, c) #=> method_missing(:m, a, b, c) */
CHECK_VM_STACK_OVERFLOW(reg_cfp, 1);
- if (argc > 0) {
- MEMMOVE(argv+1, argv, VALUE, argc);
+ if (argc > 1) {
+ MEMMOVE(argv+1, argv, VALUE, argc-1);
}
argv[0] = ID2SYM(orig_ci->mid);
INC_SP(1);