ruby-changes:15672
From: nobu <ko1@a...>
Date: Sun, 2 May 2010 18:12:17 +0900 (JST)
Subject: [ruby-changes:15672] Ruby:r27590 (trunk): * test/json/test_json_addition.rb (test_utc_datetime): fixed
nobu 2010-05-02 18:12:07 +0900 (Sun, 02 May 2010) New Revision: 27590 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=27590 Log: * test/json/test_json_addition.rb (test_utc_datetime): fixed timezone offsets. Modified files: trunk/test/json/test_json_addition.rb Index: test/json/test_json_addition.rb =================================================================== --- test/json/test_json_addition.rb (revision 27589) +++ test/json/test_json_addition.rb (revision 27590) @@ -154,9 +154,9 @@ assert_equal d, JSON.parse(d.to_json) d = DateTime.parse(now.utc.to_s) # of = 0 assert_equal d, JSON.parse(d.to_json) - d = DateTime.civil(2008, 6, 17, 11, 48, 32, 1) # of = 1 / 12 => 1/12 + d = DateTime.civil(2008, 6, 17, 11, 48, 32, Rational(1,24)) assert_equal d, JSON.parse(d.to_json) - d = DateTime.civil(2008, 6, 17, 11, 48, 32, 12) # of = 12 / 12 => 12 + d = DateTime.civil(2008, 6, 17, 11, 48, 32, Rational(12,24)) assert_equal d, JSON.parse(d.to_json) end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/