diff --git a/lib/train.rb b/lib/train.rb index 74a0a75c..50340c13 100644 --- a/lib/train.rb +++ b/lib/train.rb @@ -128,10 +128,10 @@ def self.parse_uri(string) # e.g. mock://. To do this, we match it manually and fake the hostname if u.scheme && (u.host.nil? || u.host.empty?) && u.path.empty? case string - when %r{^([a-z]+)://$} - string += "dummy" - when /^([a-z]+):$/ - string += "//dummy" + when %r{^([a-z]+)://$} + string += "dummy" + when /^([a-z]+):$/ + string += "//dummy" end u = Addressable::URI.parse(string) u.host = nil