rails/rails — Issue #3638: YYYY-MM-DD style dates generate different results with different JSON backends
Author: davidw
Created: 2011-11-15 10:49:54+00:00
State: open

irb(main):001:0> d = ActiveSupport::JSON.decode "1947-04-23"
=> Wed, 23 Apr 1947
irb(main):002:0> d.class
=> Date
irb(main):003:0> ActiveSupport::JSON.backend
=> ActiveSupport::JSON::Backends::Yaml

versus:

irb(main):001:0> d = ActiveSupport::JSON.decode "1947-04-23"
=> 1947
irb(main):004:0> d.class
=> Fixnum
irb(main):005:0> ActiveSupport::JSON.backend
=> ActiveSupport::JSON::Backends::Yajl