From c62aca26c561d7ff129d4408c81cb6f838490509 Mon Sep 17 00:00:00 2001 From: tenderlove Date: Fri, 5 Jul 2013 19:51:12 +0000 Subject: * ext/psych/lib/psych/visitors/yaml_tree.rb: register time objects so they are referenced as ids during output. * test/psych/test_date_time.rb: corresponding test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/psych/test_date_time.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/psych/test_date_time.rb') diff --git a/test/psych/test_date_time.rb b/test/psych/test_date_time.rb index df66d142f6..9a8e37bc67 100644 --- a/test/psych/test_date_time.rb +++ b/test/psych/test_date_time.rb @@ -13,5 +13,13 @@ module Psych dt = DateTime.now assert_cycle dt end + + def test_alias_with_time + t = Time.now + h = {:a => t, :b => t} + yaml = Psych.dump h + assert_match('&', yaml) + assert_match('*', yaml) + end end end -- cgit v1.2.3