1

Closed

YAML does not properly deserialize Time values.

description

MRI:
require "yaml"
=> true
yml = "some_time: 2003-07-16t15:28:11.2233+01:00"
=> "some_time: 2003-07-16t15:28:11.2233+01:00"
val = YAML.load yml
=> {"some_time"=>Wed Jul 16 10:28:11 -0400 2003}
val["some_time"].class
=> Time
 
IronRuby:
require "yaml"
=> true
yml = "some_time: 2003-07-16t15:28:11.2233+01:00"
=> "some_time: 2003-07-16t15:28:11.2233+01:00"
val = YAML.load yml
=> {"some_time"=>#<PrivateType Tag="tag:yaml.org,2002:timestamp" Value="2003-07-16t15:28:11.2233+01:00">}
val["some_time"].class
=> IronRuby::StandardLibrary::Yaml::PrivateType
Closed Jul 24, 2009 at 6:49 PM by jredville
confirmed

comments

jimmysch wrote May 4, 2009 at 2:31 AM

I believe Ray found this when working on Rails/ActiveRecord

sborde wrote Jul 24, 2009 at 5:20 PM

Looks like its fixed now