Closed hernanat closed 3 years ago
The implementation of the CSV shortcut method is broken in Ruby 3 for calls that look like this:
CSV
CSV(write_stream, col_sep: "|", headers: headers, write_headers: true) do |csv| ... end
The above will result in the following error when the CSV method attempts to pass on arguments to CSV#instance:
CSV#instance
ArgumentError: wrong number of arguments (given 2, expected 0..1)
The issue is due to the changes in Ruby 3 relating to positional & keyword arguments.
This commit updates the CSV() shortcut implementation to work with Ruby 3, and also updates the documentation for the shortcut method.
CSV()
Thanks!
thanks @kou !
The implementation of the
CSV
shortcut method is broken in Ruby 3 for calls that look like this:The above will result in the following error when the
CSV
method attempts to pass on arguments toCSV#instance
:The issue is due to the changes in Ruby 3 relating to positional & keyword arguments.
This commit updates the
CSV()
shortcut implementation to work with Ruby 3, and also updates the documentation for the shortcut method.