From b2d15dcad6febf628dc56d24b20456527101a10d Mon Sep 17 00:00:00 2001 From: ooooooo_q Date: Sun, 16 Jan 2022 05:20:47 +0900 Subject: [ruby/erb] fix regexp (https://github.com/ruby/erb/pull/6) https://github.com/ruby/erb/commit/33100a022f --- lib/erb.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/erb.rb') 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, '')) -- cgit v1.2.3