diff --git a/lib/csv.rb b/lib/csv.rb index c93c8f9ec3..75f444e461 100644 --- a/lib/csv.rb +++ b/lib/csv.rb @@ -532,8 +532,7 @@ class CSV # order and clobbers duplicate fields. # def to_hash - # flatten just one level of the internal Array - Hash[*@row.inject(Array.new) { |ary, pair| ary.push(*pair) }] + @row.to_h end #