From 5de38c41ae7bf17ae599fdfa9f8face87f16d8bb Mon Sep 17 00:00:00 2001 From: Shugo Maeda Date: Fri, 19 Feb 2021 16:38:34 +0900 Subject: ripper: fix a bug of Ripper::Lexer with syntax error and heredoc [Bug #17644] --- ext/ripper/lib/ripper/lexer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/ripper') 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 -- cgit v1.2.3