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.
I think Ruby should drop the line continuation, and interpret all three code samples like the second case above, even though it might be hard to solve with the current parser.
I think Ruby should drop the line continuation, and interpret all three code samples like the second case above, even though it might be hard to solve with the current parser.
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]