diff options
author | Shugo Maeda <shugo@ruby-lang.org> | 2021-02-19 16:38:34 +0900 |
---|---|---|
committer | Shugo Maeda <shugo@ruby-lang.org> | 2021-02-19 16:40:29 +0900 |
commit | 5de38c41ae7bf17ae599fdfa9f8face87f16d8bb (patch) | |
tree | 2c4bb713d9d3cdc1252ad2bb08357d7f56db9b6f /ext/ripper | |
parent | 7b9476fbfab738d1eb01b4b4c4af9a1680513019 (diff) | |
download | ruby-5de38c41ae7bf17ae599fdfa9f8face87f16d8bb.tar.gz |
ripper: fix a bug of Ripper::Lexer with syntax error and heredoc [Bug #17644]
Diffstat (limited to 'ext/ripper')
-rw-r--r-- | ext/ripper/lib/ripper/lexer.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/ripper/lib/ripper/lexer.rb b/ext/ripper/lib/ripper/lexer.rb index 8222684b65..f6051c6341 100644 --- a/ext/ripper/lib/ripper/lexer.rb +++ b/ext/ripper/lib/ripper/lexer.rb @@ -136,7 +136,7 @@ class Ripper end @buf.flatten! unless (result = @buf).empty? - result.concat(@buf) until (@buf = []; super(); @buf.empty?) + result.concat(@buf) until (@buf = []; super(); @buf.flatten!; @buf.empty?) end result end |