summaryrefslogtreecommitdiff
path: root/test/ripper
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-24 13:49:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-10-24 13:49:44 +0000
commit5940b1f6fc6745e4cb7516345a24b9b45567d21b (patch)
tree86e77b37741378ba9485e96da80c5f559b93852d /test/ripper
parentfe4ed311d1c8807be8f791041eadde890f2ad96e (diff)
parse.y: fix fluent interface identifier
* parse.y (parser_yylex): dispatch newline and space at fluent interface, so that the following identifier does not include the space. [ruby-dev:48684] [Bug #10411] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48126 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ripper')
-rw-r--r--test/ripper/test_scanner_events.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/ripper/test_scanner_events.rb b/test/ripper/test_scanner_events.rb
index 3044d20..e57300e 100644
--- a/test/ripper/test_scanner_events.rb
+++ b/test/ripper/test_scanner_events.rb
@@ -38,6 +38,10 @@ class TestRipper::ScannerEvents < Test::Unit::TestCase
Ripper.tokenize("print( <<""EOS)\nheredoc\nEOS\n")
assert_equal ["\#\n", "\n", "\#\n", "\n", "nil", "\n"],
Ripper.tokenize("\#\n\n\#\n\nnil\n")
+ assert_equal ["1", " ", ".", "foo", "\n"],
+ Ripper.tokenize("1 .foo\n")
+ assert_equal ["1", "\n", " ", ".", "foo", "\n"],
+ Ripper.tokenize("1\n .foo\n")
end
def test_lex