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
commit4af01150d377e03c2ae5200b48fc4030a2789ce1 (patch)
tree5c4cc602203267029f5a1d6a5c133573b39c60d6 /vm_insnhelper.c
parentcd4101f5a8d909df534f73df3f992f86ceb0374c (diff)
downloadruby-4af01150d377e03c2ae5200b48fc4030a2789ce1.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);