aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/csv.rb3
1 files changed, 1 insertions, 2 deletions
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
#