Bug #15416 » method_call_with_args_and_no_parens_in_array.patch
parse.y | ||
---|---|---|
;
|
||
aref_args : none
|
||
| command
|
||
{
|
||
/*%%%*/
|
||
value_expr($1);
|
||
$$ = NEW_LIST($1, &@$);
|
||
/*% %*/
|
||
/*% ripper: args_add!(args_new!, $1) %*/
|
||
}
|
||
| args trailer
|
||
{
|
||
$$ = $1;
|
test/ruby/test_syntax.rb | ||
---|---|---|
assert_valid_syntax('obj::foo (1) {}')
|
||
end
|
||
def test_method_call_with_args_and_no_parens_in_array
|
||
assert_equal(["1"], [sprintf "1"])
|
||
assert_equal(["2"], [sprintf "%d", 2])
|
||
end
|
||
private
|
||
def not_label(x) @result = x; @not_label ||= nil end
|