зеркало из https://github.com/github/ruby.git
Multiline method chain with leading dot works for blank lines
This commit is contained in:
Родитель
2240de98c0
Коммит
b8730f1251
1
parse.y
1
parse.y
|
@ -8680,6 +8680,7 @@ parser_yylex(struct parser_params *p)
|
|||
case '\13': /* '\v' */
|
||||
space_seen = 1;
|
||||
break;
|
||||
case '\n':
|
||||
case '#':
|
||||
SET_LEX_STATE(EXPR_EMPTYLN);
|
||||
pushback(p, c);
|
||||
|
|
|
@ -984,8 +984,8 @@ eom
|
|||
def test_fluent_dot_with_empty_lines_between
|
||||
assert_valid_syntax("a #\n #\n.foo")
|
||||
assert_valid_syntax("a #\n #\n&.foo")
|
||||
# assert_valid_syntax("a\n\n.foo")
|
||||
# assert_valid_syntax("a \n \n &.foo")
|
||||
assert_valid_syntax("a\n\n.foo")
|
||||
assert_valid_syntax("a \n \n &.foo")
|
||||
end
|
||||
|
||||
def test_no_warning_logop_literal
|
||||
|
|
Загрузка…
Ссылка в новой задаче