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

⚠️ calling URI.open via Kernel#open is deprecated, call URI.open directly

This commit is contained in:
Akira Matsuda 2019-08-16 22:29:03 +09:00
parent 5d43e9279a
commit d16f39ded2

View file

@ -1,7 +1,6 @@
# frozen_string_literal: true
require "fileutils"
require "open-uri"
require "tmpdir"
module MultibyteTestHelpers
@ -11,7 +10,7 @@ module MultibyteTestHelpers
unless File.exist?(File.dirname(to))
system "mkdir -p #{File.dirname(to)}"
end
open(from) do |source|
URI.open(from) do |source|
File.open(to, "w") do |target|
source.each_line do |l|
target.write l