Skip to content

Commit

Permalink
Merge pull request #2875 from ericgpks/fix/URI_sample_command
Browse files Browse the repository at this point in the history
fix: change sample command to use URI.open
  • Loading branch information
znz authored May 10, 2024
2 parents e00d53b + 664f124 commit ae2c5fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions refm/api/src/open-uri.rd
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ open('http://example.com/') {|f|
#@samplecode 例
#@since 2.7.0
require 'open-uri'
URL.open('http://www.ruby-lang.org/') {|f|
URI.open('http://www.ruby-lang.org/') {|f|
p f.base_uri
#=> #<URI::HTTP:0xb7043aa0 URL:http://www.ruby-lang.org/en/>
}
Expand All @@ -493,7 +493,7 @@ open('http://www.ruby-lang.org/') {|f|
#@samplecode 例
#@since 2.7.0
require 'open-uri'
URL.open('http://example.com/') {|f|
URI.open('http://example.com/') {|f|
p f.meta
#=> {"date"=>"Sun, 04 May 2008 11:26:40 GMT",
# "content-type"=>"text/html;charset=utf-8",
Expand Down

0 comments on commit ae2c5fa

Please sign in to comment.