From 129d208f9a5d54faf2eb4d944bc874fe347bfd64 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Mon, 28 Nov 2022 20:55:58 -0800 Subject: [ruby/erb] Fix line numbers after multi-line <%# (https://github.com/ruby/erb/pull/42) https://github.com/ruby/erb/commit/526885923e --- lib/erb/compiler.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/erb') diff --git a/lib/erb/compiler.rb b/lib/erb/compiler.rb index 835f5be522..547d2c4c44 100644 --- a/lib/erb/compiler.rb +++ b/lib/erb/compiler.rb @@ -384,7 +384,7 @@ class ERB::Compiler # :nodoc: when '<%=' add_insert_cmd(out, content) when '<%#' - # commented out + out.push("\n" * content.count("\n")) # only adjust lineno end end -- cgit v1.2.1