ruby / csv

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

Remove key sorting in CSV.instance #262

Closed Maumagnaguagno closed 2 years ago

Maumagnaguagno commented 2 years 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.