diff options
author | Sutou Kouhei <[email protected]> | 2021-09-15 15:58:57 +0900 |
---|---|---|
committer | Sutou Kouhei <[email protected]> | 2021-10-24 05:57:33 +0900 |
commit | 39ecdabe67d1bc7c864ada6f282590dbc9d3a14e (patch) | |
tree | 4b01e5388ee0667feaccc3547e1e10acb5b808d9 /lib/csv.rb | |
parent | 8aaa1c279f7c05a22dd108888d425565fc43e26f (diff) |
[ruby/csv] Resolve CSV::Converters and HeaderConverters lazy
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).
https://github.com/ruby/csv/commit/b0b1325d6b
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5010
Diffstat (limited to 'lib/csv.rb')
-rw-r--r-- | lib/csv.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/csv.rb b/lib/csv.rb index 7f1b404b2a..3881ba24c2 100644 --- a/lib/csv.rb +++ b/lib/csv.rb @@ -2575,7 +2575,7 @@ class CSV def build_parser_fields_converter specific_options = { - builtin_converters: Converters, + builtin_converters_name: :Converters, } options = @base_fields_converter_options.merge(specific_options) build_fields_converter(@initial_converters, options) @@ -2587,7 +2587,7 @@ class CSV def build_header_fields_converter specific_options = { - builtin_converters: HeaderConverters, + builtin_converters_name: :HeaderConverters, accept_nil: true, } options = @base_fields_converter_options.merge(specific_options) |