lib/roo/spreadsheet.rb in roo-2.0.1 vs lib/roo/spreadsheet.rb in roo-2.1.0

- old
+ new

@@ -20,10 +20,10 @@ extension when ::String options[:file_warning] = :ignore extension.tr('.', '').downcase.to_sym else - res = ::File.extname((path =~ ::URI.regexp) ? ::URI.parse(::URI.encode(path)).path : path) + res = ::File.extname((path =~ /\A#{::URI.regexp}\z/) ? ::URI.parse(::URI.encode(path)).path : path) res.tr('.', '').downcase.to_sym end end end end