mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
/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:
parent
3805ef7fb5
commit
2e6f777f9e
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue