⚠️ URI.regexp is obsolete

This commit is contained in:
Akira Matsuda 2016-11-03 22:26:01 +09:00
parent 6805707da5
commit 0640d6698d
1 changed files with 2 additions and 2 deletions

View File

@ -391,12 +391,12 @@ module Capybara
end
def app_host=(url)
raise ArgumentError.new("Capybara.app_host should be set to a url (http://www.example.com)") unless url.nil? || (url =~ URI::regexp)
raise ArgumentError.new("Capybara.app_host should be set to a url (http://www.example.com)") unless url.nil? || (url =~ URI::Parser.new.make_regexp)
@app_host = url
end
def default_host=(url)
raise ArgumentError.new("Capybara.default_host should be set to a url (http://www.example.com)") unless url.nil? || (url =~ URI::regexp)
raise ArgumentError.new("Capybara.default_host should be set to a url (http://www.example.com)") unless url.nil? || (url =~ URI::Parser.new.make_regexp)
@default_host = url
end