# File lib/mini_magick.rb, line 125 def open(file_or_url, ext = nil) file_or_url = file_or_url.to_s # Force it to be a String... hell or highwater if file_or_url.include?("://") require 'open-uri' ext ||= File.extname(URI.parse(file_or_url).path) self.read(Kernel::open(file_or_url), ext) else ext ||= File.extname(file_or_url) File.open(file_or_url, "rb") do |f| self.read(f, ext) end end end