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 /proc.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 'proc.c')
-rw-r--r-- | proc.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -942,7 +942,7 @@ rb_proc_call(VALUE self, VALUE args) GetProcPtr(self, proc); vret = rb_vm_invoke_proc(GET_EC(), proc, check_argc(RARRAY_LEN(args)), RARRAY_CONST_PTR(args), - VM_BLOCK_HANDLER_NONE); + 0 /* kw_splat */, VM_BLOCK_HANDLER_NONE); RB_GC_GUARD(self); RB_GC_GUARD(args); return vret; @@ -961,7 +961,7 @@ rb_proc_call_with_block(VALUE self, int argc, const VALUE *argv, VALUE passed_pr VALUE vret; rb_proc_t *proc; GetProcPtr(self, proc); - vret = rb_vm_invoke_proc(ec, proc, argc, argv, proc_to_block_handler(passed_procval)); + vret = rb_vm_invoke_proc(ec, proc, argc, argv, 0 /* kw_splat */, proc_to_block_handler(passed_procval)); RB_GC_GUARD(self); return vret; } |