summaryrefslogtreecommitdiff
path: root/test/psych/test_yaml.rb
diff options
context:
space:
mode:
authortenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-03 23:06:19 +0000
committertenderlove <tenderlove@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-05-03 23:06:19 +0000
commitd47073de04f706c9d044b0fad694e5936dabc207 (patch)
treee832b6fb66aaa3fbe2a0423a4f1b6cd17078a85a /test/psych/test_yaml.rb
parentfb58474627ed1df82d18536f218cf5417ddf5843 (diff)
* ext/psych/lib/psych/visitors/yaml_tree.rb: fix time dumping so that
Syck can load UTC times that Psych dumps. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/psych/test_yaml.rb')
-rw-r--r--test/psych/test_yaml.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/psych/test_yaml.rb b/test/psych/test_yaml.rb
index 5c2f6dc..41bb377 100644
--- a/test/psych/test_yaml.rb
+++ b/test/psych/test_yaml.rb
@@ -14,6 +14,12 @@ class Psych_Unit_Tests < Psych::TestCase
Psych.domain_types.clear
end
+ def test_syck_compat
+ time = Time.utc(2010, 10, 10)
+ yaml = Psych.dump time
+ assert_match "2010-10-10 00:00:00.000000000 Z", yaml
+ end
+
# [ruby-core:34969]
def test_regexp_with_n
assert_cycle(Regexp.new('',0,'n'))