aboutsummaryrefslogtreecommitdiffstats
path: root/vm_args.c
diff options
context:
space:
mode:
authorYusuke Endoh <mame@ruby-lang.org>2019-09-04 01:32:42 +0900
committerJeremy Evans <code@jeremyevans.net>2019-09-05 17:47:12 -0700
commitce04392d8d4f8cf14c70bbf1ad3544c7db4e1671 (patch)
treed7fa8f17c71b0590e56c42f8cd5497cb0a635ef8 /vm_args.c
parent3754e155309ed430250781c616a6e52b54ef511d (diff)
downloadruby-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_args.c')
-rw-r--r--vm_args.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/vm_args.c b/vm_args.c
index ef3d9e2019..17eee5e65c 100644
--- a/vm_args.c
+++ b/vm_args.c
@@ -584,7 +584,10 @@ VALUE rb_iseq_location(const rb_iseq_t *iseq);
static inline void
rb_warn_keyword_to_last_hash(struct rb_calling_info *calling, const struct rb_call_info *ci, const rb_iseq_t * const iseq)
{
- if (calling->recv == Qundef) return;
+ if (calling->recv == Qundef) {
+ rb_warn("The keyword argument is passed as the last hash parameter");
+ return;
+ }
VALUE name = rb_id2str(ci->mid);
VALUE loc = rb_iseq_location(iseq);
if (NIL_P(loc)) {