lib/watir/navigation.rb in watir-7.1.0 vs lib/watir/navigation.rb in watir-7.2.0

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + module Watir module Navigation # # Goes to the given URL. # @@ -9,10 +11,10 @@ # @param [String] uri The url. # @return [String] The url you end up at. # def goto(uri) - uri = "http://#{uri}" unless uri =~ URI::DEFAULT_PARSER.make_regexp + uri = "http://#{uri}" unless uri&.match?(URI::DEFAULT_PARSER.make_regexp) @driver.navigate.to uri @after_hooks.run uri