From cbbdb4e5a2eb46750d3c455def99486d23fc625b Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Thu, 31 Oct 2019 00:54:50 +0900 Subject: [ruby/racc] Strip trailing whitespaces at the last line of actions https://github.com/ruby/racc/commit/a887ebe529 --- lib/racc/grammarfileparser.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/racc') diff --git a/lib/racc/grammarfileparser.rb b/lib/racc/grammarfileparser.rb index ff7c682f7d..3ae539a4de 100644 --- a/lib/racc/grammarfileparser.rb +++ b/lib/racc/grammarfileparser.rb @@ -450,6 +450,7 @@ module Racc nest -= 1 if nest == 0 @in_block = nil + buf.sub!(/[ \t\f]+\z/, '') return buf end buf << (pre = ch) -- cgit v1.2.3