aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-16 18:20:29 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-12-16 18:20:29 +0000
commit13bcc1f5b0f7f377bedbdd8bf0464225836ebd13 (patch)
tree0b22e034cc308c6ef04a9242d204c244776eb053 /vm_insnhelper.c
parent3914bcf80b9451337fbac8bb6be9b4fff1cccf9d (diff)
downloadruby-13bcc1f5b0f7f377bedbdd8bf0464225836ebd13.tar.gz
* 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/trunk@53164 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 3f06b31732..44e7183eb4 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -2096,7 +2096,7 @@ vm_call_method_each_type(rb_thread_t *th, rb_control_frame_t *cfp, struct rb_cal
CALLER_SETUP_ARG(cfp, calling, ci);
rb_check_arity(calling->argc, 1, 1);
cc->aux.index = 0;
- CI_SET_FASTPATH(cc, vm_call_attrset, !(ci->flag & VM_CALL_ARGS_SPLAT));
+ CI_SET_FASTPATH(cc, vm_call_attrset, !((ci->flag & VM_CALL_ARGS_SPLAT) || (ci->flag & VM_CALL_KWARG)));
return vm_call_attrset(th, cfp, calling, ci, cc);
case VM_METHOD_TYPE_IVAR: