Actions
Bug #14243
closedComments inside ERB tags broken
Description
A backwards-incompatible change was introduced with https://github.com/ruby/ruby/commit/abbfc048c5890e8017360bbc845062ea1585e155#diff-e1ea8366d3ac334deab7e0d25309be03
Example:
require "erb"
input = "<% # comment %>\n"
puts ERB.new(input).src
Before:
#coding:UTF-8
_erbout = +''; # comment ; _erbout.<< -"\n"
; _erbout
After:
#coding:UTF-8
_erbout = +''; # comment ; _erbout.<<(-"\n"
); _erbout
The generated code produces a syntax error due to introduction of parentheses around the arguments.
Files
Actions
Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0