CSV.generate doesn't wrap a string anymore
linking with: https://github.com/ruby/csv/pull/13/files
Updated by hsbt (Hiroshi SHIBATA) almost 4 years ago
- Assignee set to kou (Kouhei Sutou)
- Status changed from Open to Closed
It will merge ruby core repository until Ruby 2.6 releasing.
Updated by doda (Kouichi Iwamoto) about 3 years ago
Could you consider backporting this patch to 2.5?
The following code that generates a CSV file with a BOM does not work correctly with Ruby 2.5.
require 'csv' csv_str = "\uFEFF" # BOM CSV.generate(csv_str) do |csv| csv << ["列1", "列2", "列3"] end print csv_str