Skip to content

Commit

Permalink
Merge pull request #146 from y-yagi/fix_doc_of_escape
Browse files Browse the repository at this point in the history
Fix the mention to removed `URI.escape/URI::Escape`
  • Loading branch information
hsbt authored Feb 27, 2025
2 parents 58d6f4e + fec9242 commit ffff34f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/uri/file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class File < Generic
# :path => '/ruby/src'})
# uri2.to_s # => "file://host.example.com/ruby/src"
#
# uri3 = URI::File.build({:path => URI::escape('/path/my file.txt')})
# uri3 = URI::File.build({:path => URI::RFC2396_PARSER.escape('/path/my file.txt')})
# uri3.to_s # => "file:///path/my%20file.txt"
#
def self.build(args)
Expand Down
2 changes: 1 addition & 1 deletion lib/uri/generic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def self.use_registry # :nodoc:
#
# At first, tries to create a new URI::Generic instance using
# URI::Generic::build. But, if exception URI::InvalidComponentError is raised,
# then it does URI::Escape.escape all URI components and tries again.
# then it does URI::RFC2396_PARSER.escape all URI components and tries again.
#
def self.build2(args)
begin
Expand Down

0 comments on commit ffff34f

Please sign in to comment.