From: ko1@... Date: 2015-12-07T07:23:41+00:00 Subject: [ruby-core:71880] [Ruby trunk - Feature #11758] Add keyword assignment syntax Issue #11758 has been updated by Koichi Sasada. Assignee set to Yukihiro Matsumoto discuss for 2.4 and later ---------------------------------------- Feature #11758: Add keyword assignment syntax https://bugs.ruby-lang.org/issues/11758#change-55283 * Author: Elia Schito * Status: Open * Priority: Normal * Assignee: Yukihiro Matsumoto ---------------------------------------- I think keyword assignments would be a useful addition, especially since the introduction of keyword arguments The basic example would be, and is expected to work like required keyword arguments: ~~~ruby a:, b: = {a: 1, b: 2} ~~~ A useful use case is returning keywords instead of multiple values making the values position independent: ~~~ruby def foo return a: 1, b: 2 end a:, b: = foo puts a # => 1 puts b # => 2 ~~~ -- https://bugs.ruby-lang.org/