Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSV 3.2.1 #5010

Merged
merged 10 commits into from
Oct 23, 2021
Merged

CSV 3.2.1 #5010

merged 10 commits into from
Oct 23, 2021

Conversation

kou
Copy link
Member

@kou kou commented Oct 22, 2021

No description provided.

kou and others added 10 commits October 23, 2021 06:15
It's for Ractor. If you want to use the built-in converters, you
should call Ractor.make_shareable(CSV::Converters) and/or
Ractor.make_shareable(CSV::HeaderConverters).

ruby/csv@b0b1325d6b
The implementation of the `CSV` shortcut method is broken in Ruby 3
for calls that look like this:

```ruby
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`:

```
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.

ruby/csv@310dee45fa
@kou kou merged commit 76e277a into ruby:master Oct 23, 2021
@kou kou deleted the csv-3.2.1 branch October 23, 2021 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
6 participants