zenkay / simple-spreadsheet

Simple spreadsheet is a Ruby Gem reader for common spreadsheet formats: Excel (.xls, .xlsx), Open-office (.ods) and CSV (standard, excel, tab separated)
https://rubygems.org/gems/simple-spreadsheet
MIT License
98 stars 32 forks source link

Allow for pathnames to be used as filenames #13

Closed spaghetticode closed 8 years ago

spaghetticode commented 9 years ago

Hi there, I realized pathnames were not handled correctly by the gem. If you tried to use a pathname instance as a filename the gem raised an exception similar to

NoMethodError: undefined method `start_with?' for #<Pathname:0x0000010216ab90>

This pull request easily fixes the issue ensuring making sure the filename is typecasted to string.

Best,

Andrea