lib/roo/spreadsheet.rb in roo-1.12.2 vs lib/roo/spreadsheet.rb in roo-1.13.0
- old
+ new
@@ -5,12 +5,12 @@
file = File === file ? file.path : file
extension =
if options[:extension]
options[:file_warning] = :ignore
- ".#{options[:extension]}"
+ ".#{options[:extension]}".gsub(/[.]+/, ".")
else
- File.extname(file)
+ File.extname(URI.parse(file).path)
end
case extension.downcase
when '.xls'
Roo::Excel.new(file, options)