
Issue #20675 has been updated by Dan0042 (Daniel DeLorme). I agree that `f k:` at end of line should be parsed as `f(k:)`. Even though it is backward incompatible, it can be detected statically, so the migration path is easy. Ruby 3.4 could output a deprecation warning at parse time. We could have a script/gem to detect if the pattern is currently used in any files, so people can check their application code. If it's used in any gems they could be flagged as incompatible with Ruby 3.5. There's a number of pain-free ways of dealing with this. ---------------------------------------- Bug #20675: Parse error with required kwargs and omitted parens https://bugs.ruby-lang.org/issues/20675#change-109423 * Author: matz (Yukihiro Matsumoto) * Status: Open * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- As pointed out in https://github.com/mruby/mruby/issues/6268, keyword arguments without surrounding parens are a bit confusing, e.g. ```ruby def foo arg: 123 end ``` is parsed as ```ruby def foo(arg:) 123 end ``` where ```ruby k=25 f k: 10 ``` is parserd as ```ruby k=25 f(k: 10) ``` In summary, should we ignore newlines after keyword labels? Should we make them behave consistent? Matz. -- https://bugs.ruby-lang.org/