`/o` should not use with instance variable

for example:
```
class C;def initialize(pat);@pat=pat;end;def re;/#{@pat}/o;end;end
C.new('1').re #=> /1/
C.new('2').re #=> /1/
```
This commit is contained in:
Kazuhiro NISHIYAMA 2019-07-30 12:44:38 +09:00
Родитель 3805ef7fb5
Коммит 2e6f777f9e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 262ED8DBB4222F7A
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -112,7 +112,7 @@ class RDoc::Servlet < WEBrick::HTTPServlet::AbstractServlet
# GET request entry point. Fills in +res+ for the path, etc. in +req+.
def do_GET req, res
req.path.sub!(/\A#{Regexp.escape @mount_path}/o, '') if @mount_path
req.path.sub!(/\A#{Regexp.escape @mount_path}/, '') if @mount_path
case req.path
when '/' then