Support of Ruby 2.3 removed as its life ended

This commit is contained in:
erwanlr
2019-04-04 15:40:21 +01:00
parent 352286e497
commit 888779f81b
9 changed files with 11 additions and 19 deletions

View File

@@ -79,7 +79,7 @@ module WPScan
end
def wordpress_hosted?
uri.host =~ /\.wordpress\.com$/i ? true : false
/\.wordpress\.com$/i.match?(uri.host) ? true : false
end
# @param [ String ] username

View File

@@ -112,9 +112,9 @@ module WPScan
def url(path = nil)
return @uri.to_s unless path
if path =~ %r{wp\-content/plugins}i
if %r{wp\-content/plugins}i.match?(path)
path = +path.gsub('wp-content/plugins', plugins_dir)
elsif path =~ /wp\-content/i
elsif /wp\-content/i.match?(path)
path = +path.gsub('wp-content', content_dir)
elsif path[0] != '/' && sub_dir
path = "#{sub_dir}/#{path}"