Skip to content

Conversation

@dpep
Copy link
Contributor

@dpep dpep commented Mar 8, 2024

Hey Tilo,

smarter_csv modifies the options hash before dup-ing, which explodes when the options hash is frozen. This happens, specifically, when setting invalid_byte_sequence. I did a little tidying up while I was at it 🎯 😉

@tilo
Copy link
Owner

tilo commented Mar 9, 2024

thank you for finding this @dpep !

@codecov-commenter
Copy link

codecov-commenter commented Mar 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (2f264ca) to head (c6fc0a7).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #273   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           11        11           
  Lines          380       380           
=========================================
  Hits           380       380           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

options = {chunk_size: 1}.freeze
generated_options = SmarterCSV.process_options(options)
expect(generated_options[:chunk_size]).to eq 1
end
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you for the test!

@tilo tilo merged commit 6b640ac into tilo:main Mar 9, 2024
@dpep dpep deleted the frozen-options-bug branch March 12, 2024 16:50
tilo added a commit that referenced this pull request Apr 7, 2024
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.

3 participants