From 348a909ab9fe4ec26cdf5e198a6621205f9656d3 Mon Sep 17 00:00:00 2001 From: usa Date: Sun, 28 Feb 2021 14:31:52 +0000 Subject: * 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 --- vm_args.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'vm_args.c') 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) { -- cgit v1.2.3