Method: URI::File#initialize

Defined in:
lib/json-schema/uri/file.rb

#initialize(*arg) ⇒ File

Returns a new instance of File.



17
18
19
20
21
22
23
# File 'lib/json-schema/uri/file.rb', line 17

def initialize(*arg)
  # arg[2] is the 'host'; this logic to set it to "" causes file schemes with UNC to break
  # so don't do it on windows platforms
  is_windows = (RbConfig::CONFIG['host_os'] =~ /mswin|mingw|cygwin/)
  arg[2] = "" unless is_windows
  super(*arg)
end