From b84b253a69537a14e4854e17b6d94ae75c2af050 Mon Sep 17 00:00:00 2001 From: manga_osyo Date: Sun, 17 Jan 2021 04:41:01 +0900 Subject: Fix Ripper with heredoc. --- ext/ripper/lib/ripper/lexer.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'ext') diff --git a/ext/ripper/lib/ripper/lexer.rb b/ext/ripper/lib/ripper/lexer.rb index 35ef9b088c..8222684b65 100644 --- a/ext/ripper/lib/ripper/lexer.rb +++ b/ext/ripper/lib/ripper/lexer.rb @@ -130,6 +130,7 @@ class Ripper @buf = [] @stack = [] super() + @buf = @stack.pop unless @stack.empty? if raise_errors and !@errors.empty? raise SyntaxError, @errors.map(&:message).join(' ;') end -- cgit v1.2.3