From cb20ef68163fa72a568324ea9aed89b2e16a7f87 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Sat, 20 May 2023 18:23:35 +0200 Subject: Remove check needed for Ruby < 2.5 Ref: #202 --- lib/axlsx/util/mime_type_utils.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/axlsx/util/mime_type_utils.rb b/lib/axlsx/util/mime_type_utils.rb index 5dbe0ac5..c2e6909f 100644 --- a/lib/axlsx/util/mime_type_utils.rb +++ b/lib/axlsx/util/mime_type_utils.rb @@ -16,11 +16,7 @@ module Axlsx # @param [String] v URI # @return [String] File mime type def self.get_mime_type_from_uri(v) - if URI.respond_to?(:open) - Marcel::MimeType.for(URI.open(v)) - else - Marcel::MimeType.for(URI.parse(v).open) - end + Marcel::MimeType.for(URI.open(v)) end end end -- cgit v1.2.3