ruby / csv

CSV Reading and Writing
https://ruby.github.io/csv/
BSD 2-Clause "Simplified" License
177 stars 113 forks source link

Remove key sorting in CSV.instance #262

Closed Maumagnaguagno closed 1 year ago

Maumagnaguagno commented 1 year ago

DEFAULT_OPTIONS is a frozen Hash with symbols as keys. There is no need to convert such keys to strings before sorting. Note that sorting is not needed for stable implementations of Hash, keys would always be returned in the same entry order. Sorting removed as all supported Ruby versions implement entry order Hashes.