Shadowfirebird
8/14/2008 8:49:00 PM
This might be it. Understandable but annoying:
irb(main):001:0> require 'date'
=> true
irb(main):004:0> require 'yaml'
=> true
irb(main):010:0> a = "2008-08-10"
=> "2008-08-10"
irb(main):011:0> y = YAML::load(a)
=> #<Date: 4909377/2,0,2299161>
irb(main):012:0> a = "2008-8-10"
=> "2008-8-10"
irb(main):013:0> y = YAML::load(a)
=> "2008-8-10"
Annoying because Date.parse("2008-8-10") would be fine.
Can anyone suggest an elegant way to upgrade YAML::load()?