summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authornagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-17 15:59:36 +0000
committernagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-01-17 15:59:36 +0000
commit2054417ec66ffce4cd9b06cd2077f49487a3cd77 (patch)
tree7bce1d349ec08a7cec8acfbb23fe30975a34fc1a /vm_insnhelper.c
parent9c6779f53eb485b4653fb750a01447155b9e8fe4 (diff)
merge revision(s) 53164: [Backport #11657]
* vm_insnhelper.c (vm_call_method_each_type): should not set fastpath with keyword arguments for VM_METHOD_TYPE_ATTRSET type methods. Normally, we can not use keyword arguments for this kind of methods, (obj.foo = 1), but we can set alias names for them. [Bug #11657] * test/ruby/test_keyword.rb: add a test for this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@53567 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index fae13e82c3..e5c8df6df9 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -1691,7 +1691,7 @@ vm_call_method(rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci)
CALLER_SETUP_ARG(cfp, ci);
rb_check_arity(ci->argc, 1, 1);
ci->aux.index = 0;
- CI_SET_FASTPATH(ci, vm_call_attrset, enable_fastpath && !(ci->flag & VM_CALL_ARGS_SPLAT));
+ CI_SET_FASTPATH(ci, vm_call_attrset, enable_fastpath && !(ci->flag & VM_CALL_ARGS_SPLAT) && ci->kw_arg == NULL);
return vm_call_attrset(th, cfp, ci);
}
case VM_METHOD_TYPE_IVAR:{