Skip to content

Conversation

@TomFreudenberg
Copy link

@TomFreudenberg TomFreudenberg commented Oct 8, 2020

Summary

This is a bug fix for method Base::info when object is initialized by stream and not filename

require 'roo'

content = "Id;Name;Surname;Title\n"
(1..1000).each { |i| content << "#{i};John;Wick;Actor\n" }
content_io = StringIO.new(content)
spreadsheet = Roo::CSV.new(content_io, csv_options: { col_sep: ';' })
puts spreadsheet.info
spreadsheet.reload
puts spreadsheet.info

What happens without this fix:

  • info break to show filename
  • second output of info will show wrong information cause not rewinded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant