A gem that supports ruby/ruby#1075 (ruby-core:71227).
$ gem install erb-comment
require 'erb/comment'
erb = <<-ERB
<#-- <% hello %> --#>
hello
ERB
Erb::Comment.new(erb).result #=> "\nhello\n"The gem is available as open source under the terms of the MIT License.