1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Replace Kernel.#open with URI.open in doc

Because `Kernel.#open` no longer opens URI since Ruby 3.0.
This commit is contained in:
Masataka Pocke Kuwabara 2021-01-08 23:52:35 +09:00 committed by Jeremy Evans
parent 98bd7e87a0
commit 391ee3ee3a
Notes: git 2021-01-09 00:32:02 +09:00
2 changed files with 4 additions and 4 deletions

View file

@ -105,7 +105,7 @@ module Kernel
# require 'json'
#
# construct_url(arguments).
# then {|url| open(url).read }.
# then {|url| URI.open(url).read }.
# then {|response| JSON.parse(response) }
#
# When called without block, the method returns +Enumerator+,
@ -138,7 +138,7 @@ module Kernel
# require 'json'
#
# construct_url(arguments).
# then {|url| open(url).read }.
# then {|url| URI.open(url).read }.
# then {|response| JSON.parse(response) }
#
def yield_self