ruby-changes:50977
From: stomar <ko1@a...>
Date: Wed, 18 Apr 2018 04:48:01 +0900 (JST)
Subject: [ruby-changes:50977] stomar:r63184 (trunk): lib/uri/file.rb: fix errors in docs for URI::File.build
stomar 2018-04-18 04:47:57 +0900 (Wed, 18 Apr 2018) New Revision: 63184 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63184 Log: lib/uri/file.rb: fix errors in docs for URI::File.build * lib/uri/file.rb: [DOC] fix description and example for URI::File.build; for file URIs the path component must be absolute, escaping of absolute paths is only done for URI::FTP. Modified files: trunk/lib/uri/file.rb Index: lib/uri/file.rb =================================================================== --- lib/uri/file.rb (revision 63183) +++ lib/uri/file.rb (revision 63184) @@ -33,9 +33,6 @@ module URI https://github.com/ruby/ruby/blob/trunk/lib/uri/file.rb#L33 # If an Array is used, the components must be passed in the # order <code>[host, path]</code>. # - # If the path supplied is absolute, it will be escaped in order to - # make it absolute in the URI. - # # Examples: # # require 'uri' @@ -44,7 +41,7 @@ module URI https://github.com/ruby/ruby/blob/trunk/lib/uri/file.rb#L41 # uri1.to_s # => "file://host.example.com/path/file.zip" # # uri2 = URI::File.build({:host => 'host.example.com', - # :path => 'ruby/src'}) + # :path => '/ruby/src'}) # uri2.to_s # => "file://host.example.com/ruby/src" # def self.build(args) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/