summaryrefslogtreecommitdiff
path: root/lib/rdoc/servlet.rb
diff options
context:
space:
mode:
authorKazuhiro NISHIYAMA <zn@mbf.nifty.com>2019-07-30 12:44:38 +0900
committerKazuhiro NISHIYAMA <zn@mbf.nifty.com>2019-07-30 12:44:38 +0900
commit2e6f777f9efa8ba15dcd1b7c1bb1917e5d31d6f8 (patch)
tree7170dab5f759de11460cb6c3fe1f1db0431d5adc /lib/rdoc/servlet.rb
parent3805ef7fb57136be46fceb693340981c75eb8ec1 (diff)
`/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/ ```
Diffstat (limited to 'lib/rdoc/servlet.rb')
-rw-r--r--lib/rdoc/servlet.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rdoc/servlet.rb b/lib/rdoc/servlet.rb
index 1fd9a62c12..e1d0f0ce82 100644
--- a/lib/rdoc/servlet.rb
+++ b/lib/rdoc/servlet.rb
@@ -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