diff options
author | ooooooo_q <ooooooo-q@users.noreply.github.com> | 2022-01-16 05:20:47 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2022-01-16 05:21:05 +0900 |
commit | b2d15dcad6febf628dc56d24b20456527101a10d (patch) | |
tree | e82aa95f9f9bb04ef0c861ef88e661be86fa4a6a /lib | |
parent | 4c2d6f76553d03a5c9742a2cf3a22e41333d75a7 (diff) | |
download | ruby-b2d15dcad6febf628dc56d24b20456527101a10d.tar.gz |
[ruby/erb] fix regexp (https://github.com/ruby/erb/pull/6)
https://github.com/ruby/erb/commit/33100a022f
Diffstat (limited to 'lib')
-rw-r--r-- | lib/erb.rb | 2 |
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, '')) |