zdavatz / spreadsheet

The Ruby Spreadsheet by ywesee GmbH
http://spreadsheet.ch
GNU General Public License v3.0
1.13k stars 240 forks source link

can read frozen string io #235

Closed cyrilchampier closed 5 years ago

cyrilchampier commented 5 years ago

Using: https://apidock.com/ruby/StringIO/set_encoding

cyrilchampier commented 5 years ago

resolve https://github.com/zdavatz/spreadsheet/issues/234

cyrilchampier commented 5 years ago

hum set_encoding was introduced in ruby 1.9.1. I the gem still support 1.8.6 and 1.8.7, should I fallback to .string.force_encoding ?

cyrilchampier commented 5 years ago

behaviour of set_encoding was only correct on ruby > 2.3: https://bugs.ruby-lang.org/issues/11827