diff options
author | Yusuke Endoh <mame@ruby-lang.org> | 2019-09-04 01:32:42 +0900 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2019-09-05 17:47:12 -0700 |
commit | ce04392d8d4f8cf14c70bbf1ad3544c7db4e1671 (patch) | |
tree | d7fa8f17c71b0590e56c42f8cd5497cb0a635ef8 /vm_eval.c | |
parent | 3754e155309ed430250781c616a6e52b54ef511d (diff) | |
download | ruby-ce04392d8d4f8cf14c70bbf1ad3544c7db4e1671.tar.gz |
Propagate kw_splat information
The kw_splat flag is whether the original call passes keyword or not.
Some types of methods (e.g., bmethod and sym_proc) drops the
information. This change tries to propagate the flag to the final
callee, as far as I can.
Diffstat (limited to 'vm_eval.c')
-rw-r--r-- | vm_eval.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -56,6 +56,7 @@ rb_vm_call0(rb_execution_context_t *ec, VALUE recv, ID id, int argc, const VALUE calling->recv = recv; calling->argc = argc; + calling->kw_splat = 0; return vm_call0_body(ec, calling, &ci_entry, &cc_entry, argv); } @@ -184,7 +185,7 @@ vm_call0_body(rb_execution_context_t *ec, struct rb_calling_info *calling, const { rb_proc_t *proc; GetProcPtr(calling->recv, proc); - ret = rb_vm_invoke_proc(ec, proc, calling->argc, argv, calling->block_handler); + ret = rb_vm_invoke_proc(ec, proc, calling->argc, argv, calling->kw_splat, calling->block_handler); goto success; } default: |