Project

General

Profile

Bug #5906 » csv_converter_bug.rb

steenslag (siep korteling), 01/19/2012 01:34 AM

 
require 'csv'

str = "10-10-2010,10.33"
p csv = CSV.new(str,{:converters => :date_time}).first
# expected: [#<DateTime: 2010-10-01T00:00:00+00:00 ((2455471j,0s,0n),+0s,2299161j)>, "10.33"
# got: ["10-10-2010", "10.33"]
p csv = CSV.new(str,{:converters => :all}).first
#=> ["10-10-2010", 10.33]

(1-1/2)