summaryrefslogtreecommitdiff
path: root/lib/erb/compiler.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2022-11-28 20:55:58 -0800
committergit <[email protected]>2022-11-29 04:56:03 +0000
commit129d208f9a5d54faf2eb4d944bc874fe347bfd64 (patch)
treecd219d171d0d0dc30d884966c80779b4b1aa28fd /lib/erb/compiler.rb
parentb5726892d0d9bf282d54e21e8f170f754c235456 (diff)
[ruby/erb] Fix line numbers after multi-line <%#
(https://github.com/ruby/erb/pull/42) https://github.com/ruby/erb/commit/526885923e
Diffstat (limited to 'lib/erb/compiler.rb')
-rw-r--r--lib/erb/compiler.rb2
1 files changed, 1 insertions, 1 deletions
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