From: "nagachika (Tomoyuki Chikanaga) via ruby-core" Date: 2024-02-25T05:04:45+00:00 Subject: [ruby-core:116934] [Ruby master Bug#19973] Duplicate keyword argument names don't always warn Issue #19973 has been updated by nagachika (Tomoyuki Chikanaga). Backport changed from 3.0: REQUIRED, 3.1: REQUIRED, 3.2: DONE to 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED reverted backport commit at 1b9ff146e38c348519434754e0466352b8b25c50. it cause CI failures. http://rubyci.s3.amazonaws.com/ubuntu2204/ruby-3.2/log/20240225T042407Z.fail.html.gz ---------------------------------------- Bug #19973: Duplicate keyword argument names don't always warn https://bugs.ruby-lang.org/issues/19973#change-106969 * Author: tenderlovemaking (Aaron Patterson) * Status: Closed * ruby -v: ruby 3.3.0dev (2023-10-24T19:38:50Z cleanup 3525a9bd22) [arm64-darwin23] * Backport: 3.0: REQUIRED, 3.1: REQUIRED, 3.2: REQUIRED ---------------------------------------- Calling a method with duplicate keyword arguments doesn't warn when it could: ```ruby def bar a:, b: a + b end # Warning bar(a: 1, b: 3, a: 2) z = { b: 123 } # No warning bar(a: 1, **z, a: 2) ``` The first call to `bar` gives a warning about duplicate keyword args, but the second call doesn't. I think both cases should emit a warning. -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/postorius/lists/ruby-core.ml.ruby-lang.org/