From: Tomoyuki Chikanaga Date: 2011-06-11T12:56:54+09:00 Subject: [ruby-core:36960] [Ruby 1.9 - Bug #4868][Closed] ActiveSupport::JSON.decode Fails Decoding Date/Time String Issue #4868 has been updated by Tomoyuki Chikanaga. Category set to lib Status changed from Third Party's Issue to Closed Target version set to 1.9.2 Hi, Tom, thank you for your report. I think this issue was fixed in trunk by r30957. And it was already back-ported to ruby_1_9_2 branch by r31769. Please wait the new 1.9.2 patch level release. Regards, ---------------------------------------- Bug #4868: ActiveSupport::JSON.decode Fails Decoding Date/Time String http://redmine.ruby-lang.org/issues/4868 Author: Tom Boilard Status: Closed Priority: Normal Assignee: Category: lib Target version: 1.9.2 ruby -v: ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.4] Issuing the command... ActiveSupport::JSON.decode('[{"created_at":"2011-06-10T18:09:09-04:00"}]') using the rails console results in the following error... Psych::SyntaxError: couldn't parse YAML at line 1 column 30 from /Users/tboilard/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych.rb:148:in parse' from /Users/tboilard/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych.rb:148:inparse_stream' from /Users/tboilard/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych.rb:119:in parse' from /Users/tboilard/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/psych.rb:106:inload' from /Users/tboilard/.rvm/gems/ruby-1.9.2-p180@rails307/gems/activesupport-3.0.7/lib/active_support/json/backends/yaml.rb:15:in decode' from /Users/tboilard/.rvm/gems/ruby-1.9.2-p180@rails307/gems/activesupport-3.0.7/lib/active_support/json/decoding.rb:14:indecode' from (irb):46 from /Users/tboilard/.rvm/gems/ruby-1.9.2-p180@rails307/gems/railties-3.0.7/lib/rails/commands/console.rb:44:in start' from /Users/tboilard/.rvm/gems/ruby-1.9.2-p180@rails307/gems/railties-3.0.7/lib/rails/commands/console.rb:8:instart' from /Users/tboilard/.rvm/gems/ruby-1.9.2-p180@rails307/gems/railties-3.0.7/lib/rails/commands.rb:23:in ' from script/rails:6:inrequire' from script/rails:6:in `' Running Rails 3.0.7 and ruby-1.9.2-p180. Issue was discovered while updating a rails 2.3.11 app to rails 3. Please let me know if you need any other information. Thanks Tom -- http://redmine.ruby-lang.org