Closed ghost closed 2 years ago
I understand your expected behavior but we can't change the current behavior to keep compatibility.
Could you specify header_converters:
explicitly?
csv_table = CSV.table('momo.csv', header_converters: lambda {|h| h.to_sym})
We can provide :symbol_raw
default header converter by adding a converter to CSV::HeaderConverters
. If we provide :symbol_raw
, we can write like the following:
csv_table = CSV.table('momo.csv', header_converters: :symbol_raw)
@ericgpks Do you want to work on this?
@kou I would like to try to resolve this one! Thanks a lot!! Can you assign this on to me?
@ericgpks Sure. Go ahead!
Done by #239.
Thank you!!
Steps to reproduce
Expected behavior
csv_table#headers
returns[:都道府県, :桃の生産量]
Actual behavior
csv_table#headers
returns[:"", :""]
System configuration
Ruby version: ruby 3.1.0p0 csv version: csv (default: 3.2.2)