summaryrefslogtreecommitdiff
path: root/lib/erb
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2022-11-28 20:55:58 -0800
committergit <svn-admin@ruby-lang.org>2022-11-29 04:56:03 +0000
commit129d208f9a5d54faf2eb4d944bc874fe347bfd64 (patch)
treecd219d171d0d0dc30d884966c80779b4b1aa28fd /lib/erb
parentb5726892d0d9bf282d54e21e8f170f754c235456 (diff)
downloadruby-129d208f9a5d54faf2eb4d944bc874fe347bfd64.tar.gz
[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')
-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