From: nobu@... Date: 2014-03-25T07:47:45+00:00 Subject: [ruby-core:61672] [ruby-trunk - Bug #9669] [Closed] Inconsistent SyntaxError in Ruby 2.1 mandatory keyword arguments definition without parentheses. Issue #9669 has been updated by Nobuyoshi Nakada. Status changed from Open to Closed % Done changed from 0 to 100 Applied in changeset r45405. ---------- parse.y: required kwarg without parentheses * parse.y (lex_state_e, parser_params, f_arglist, parser_yylex): separate EXPR_LABELARG from EXPR_BEG and let newline significant, so that required keyword argument can place at the end of argument list without parentheses. [ruby-core:61658] [Bug #9669] ---------------------------------------- Bug #9669: Inconsistent SyntaxError in Ruby 2.1 mandatory keyword arguments definition without parentheses. https://bugs.ruby-lang.org/issues/9669#change-45926 * Author: Teja Sophista * Status: Closed * Priority: Normal * Assignee: * Category: * Target version: * ruby -v: 2.1.1 * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN ---------------------------------------- Ruby allowed us to define method with arguments without parentheses. ~~~ def foo a:, b: 'bar' end #=> :foo def foo a:, b: puts 'bar' end #=> syntax error ~~~ -- https://bugs.ruby-lang.org/