Skip to content

Commit 75a0749

Browse files
committed
Escape the second *
The original code just seems unintentional
1 parent 33100a0 commit 75a0749

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/erb.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -724,7 +724,7 @@ def detect_magic_comment(s, enc = nil)
724724
frozen = nil
725725
s.scan(re) do
726726
comment = $+
727-
comment = $1 if comment[/-\*-\s*([^\s].*?)\s*-*-$/]
727+
comment = $1 if comment[/-\*-\s*([^\s].*?)\s*-\*-$/]
728728
case comment
729729
when %r"coding\s*[=:]\s*([[:alnum:]\-_]+)"
730730
enc = Encoding.find($1.sub(/-(?:mac|dos|unix)/i, ''))

0 commit comments

Comments
 (0)