Skip to content

Commit

Permalink
use URI.open instead of Kernel.open for Ruby 2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
aubinlrx committed Mar 26, 2020
1 parent f10026b commit 6097836
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/carrierwave/uploader/download.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def file
headers = @remote_headers.
reverse_merge('User-Agent' => "CarrierWave/#{CarrierWave::VERSION}")

@file = Kernel.open(@uri.to_s, headers)
@file = URI.open(@uri.to_s, headers)
@file = @file.is_a?(String) ? StringIO.new(@file) : @file
end
@file
Expand Down

0 comments on commit 6097836

Please sign in to comment.