Issue #9669 has been updated by Tsuyoshi Sawada. That is consistent. In the first example, `'bar'` is interpreted as the default value of `b`. In the second example, the expression `puts 'bar'` is inappropriate as the default value, hence the error. ---------------------------------------- Bug #9669: Inconsistent SyntaxError in Ruby 2.1 mandatory keyword arguments definition without parentheses. https://bugs.ruby-lang.org/issues/9669#change-45917 * Author: Teja Sophista * Status: Open * 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/