summaryrefslogtreecommitdiff
path: root/vm_args.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2021-02-28 14:31:52 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2021-02-28 14:31:52 +0000
commit348a909ab9fe4ec26cdf5e198a6621205f9656d3 (patch)
treed8c981f3cfebfe442f48ffe9bbe6649264429faf /vm_args.c
parent3f4f5fdf0b0ef9df7a8a32a73b4af2c46a2373a5 (diff)
* vm_args.c (setup_parameters_complex): no longer need to warn splat
hash in a pattern. [Backport #16632][Bacport #16950] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67899 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_args.c')
-rw-r--r--vm_args.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/vm_args.c b/vm_args.c
index 299ed16aa8..2e70ed3fcf 100644
--- a/vm_args.c
+++ b/vm_args.c
@@ -685,17 +685,6 @@ setup_parameters_complex(rb_execution_context_t * const ec, const rb_iseq_t * co
else if (!NIL_P(keyword_hash) && RHASH_SIZE(keyword_hash) > 0) {
argument_kw_error(ec, iseq, "unknown", rb_hash_keys(keyword_hash));
}
- else if (kw_splat && NIL_P(keyword_hash)) {
- if (RTEST(ruby_verbose)) {
- VALUE path = rb_iseq_path(iseq);
- VALUE line = rb_iseq_first_lineno(iseq);
- VALUE label = rb_iseq_label(iseq);
- rb_compile_warning(NIL_P(path) ? NULL : RSTRING_PTR(path), FIX2INT(line),
- "in `%s': the last argument was passed as a single Hash",
- NIL_P(label) ? NULL : RSTRING_PTR(label));
- rb_warning("although a splat keyword arguments here");
- }
- }
if (iseq->body->param.flags.has_block) {
if (iseq->body->local_iseq == iseq) {