1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

4 commits

Author SHA1 Message Date
Anthony Hernandez
8fde54a3b5 [ruby/csv] CSV(): Add support for Ruby 3 (https://github.com/ruby/csv/pull/215)
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.

310dee45fa
2021-10-24 05:57:33 +09:00
Burdette Lamar
614afb1647 [ruby/csv] Fix CSV.filter to preserve headers (#174)
Co-authored-by: Sutou Kouhei <kou@clear-code.com>

203c5e0574
2020-11-24 09:33:55 +09:00
Nobuyoshi Nakada
45ba027d08
Removed unused variables 2019-06-30 08:45:01 +09:00
kou
e3b6c7c7eb Import CSV 3.0.8
This includes performance improvements and backward incompatibility
fixes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-14 21:01:51 +00:00