Unverified Commit fc0e0f8d authored by Tim Smith's avatar Tim Smith Committed by DJ Mountney
Browse files

Merge pull request #940 from mattray/open_uri

Ruby 2.7.1 adds a warning on calling open directly, needs to be URI.open
parent fcabf142
......@@ -77,7 +77,11 @@ module Omnibus
end
end
file = open(from_url, options)
if RUBY_VERSION.to_f < 2.7
file = open(from_url, options)
else
file = URI.open(from_url, options)
end
# This is a temporary file. Close and flush it before attempting to copy
# it over.
file.close
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment