diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-12 05:17:06 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-12 05:17:06 +0000 |
commit | 68e16ddd7961b86e5013e62ae2954e88638de058 (patch) | |
tree | 45140bfa199d296d26a0d0cb39740c41d1e5261a /test/ruby | |
parent | 88edab89f4a0cabc9e10f2b8c8cf81cc3eda68c9 (diff) | |
download | ruby-68e16ddd7961b86e5013e62ae2954e88638de058.tar.gz |
parse.y: ANDDOT fluent interface
* parse.y (parser_yylex): ANDDOT at the head of the line denote
line continuation from previous one to support fluent interface,
as well as single dot.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52548 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_syntax.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_syntax.rb b/test/ruby/test_syntax.rb index 1f76425cad..985a46b532 100644 --- a/test/ruby/test_syntax.rb +++ b/test/ruby/test_syntax.rb @@ -628,6 +628,11 @@ eom assert_syntax_error(":#\n foo", /unexpected ':'/) end + def test_fluent_dot + assert_valid_syntax("a\n.foo") + assert_valid_syntax("a\n&.foo") + end + private def not_label(x) @result = x; @not_label ||= nil end |