From: "Earlopain (A S) via ruby-core" Date: 2024-06-08T12:02:10+00:00 Subject: [ruby-core:118251] [Ruby master Feature#20565] Relax formal argument at label Issue #20565 has been updated by Earlopain (A S). I knew you can use keywords as names here but am not quite sure about this. Positional arguments (against my expectations from keyword arguments) don't allow any of these three versions. Should they also work? I think it would be nice if they behave the same for keyword identifiers at least. While you are able to create local variables that look like keywords with `binding.local_variable_set`, the same is not true for identifiers that look like constants or globals. > wrong local variable name '$g' for # > wrong local variable name 'C' for # ---------------------------------------- Feature #20565: Relax formal argument at label https://bugs.ruby-lang.org/issues/20565#change-108748 * Author: nobu (Nobuyoshi Nakada) * Status: Open ---------------------------------------- Just a thought: if `def foo(if:)` is possible, shouldn't `def foo(C:)` and `def foo($g:)` also be possible...? -- https://bugs.ruby-lang.org/