summaryrefslogtreecommitdiff
path: root/lib/erb.rb
diff options
context:
space:
mode:
authorooooooo_q <ooooooo-q@users.noreply.github.com>2022-01-16 05:20:47 +0900
committergit <svn-admin@ruby-lang.org>2022-01-16 05:21:05 +0900
commitb2d15dcad6febf628dc56d24b20456527101a10d (patch)
treee82aa95f9f9bb04ef0c861ef88e661be86fa4a6a /lib/erb.rb
parent4c2d6f76553d03a5c9742a2cf3a22e41333d75a7 (diff)
[ruby/erb] fix regexp (https://github.com/ruby/erb/pull/6)
https://github.com/ruby/erb/commit/33100a022f
Diffstat (limited to 'lib/erb.rb')
-rw-r--r--lib/erb.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/erb.rb b/lib/erb.rb
index 3045106c92..33438634d1 100644
--- a/lib/erb.rb
+++ b/lib/erb.rb
@@ -724,7 +724,7 @@ class ERB
frozen = nil
s.scan(re) do
comment = $+
- comment = $1 if comment[/-\*-\s*(.*?)\s*-*-$/]
+ comment = $1 if comment[/-\*-\s*([^\s].*?)\s*-*-$/]
case comment
when %r"coding\s*[=:]\s*([[:alnum:]\-_]+)"
enc = Encoding.find($1.sub(/-(?:mac|dos|unix)/i, ''))