From a6dec2e144d65011d49f272e494bf62daf3d7531 Mon Sep 17 00:00:00 2001 From: "NARUSE, Yui" Date: Tue, 2 Mar 2021 18:28:30 +0900 Subject: merge revision(s) 5de38c41ae7bf17ae599fdfa9f8face87f16d8bb: [Backport #17644] ripper: fix a bug of Ripper::Lexer with syntax error and heredoc [Bug #17644] --- ext/ripper/lib/ripper/lexer.rb | 2 +- test/ripper/test_lexer.rb | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) --- ext/ripper/lib/ripper/lexer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext') diff --git a/ext/ripper/lib/ripper/lexer.rb b/ext/ripper/lib/ripper/lexer.rb index 06db264497..1df1c022c7 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