summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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, ''))