aboutsummaryrefslogtreecommitdiffstats
path: root/test/date/test_date_marshal.rb
diff options
context:
space:
mode:
authortadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-03 05:17:38 +0000
committertadf <tadf@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-03 05:17:38 +0000
commit5dc5a526125b25200fb6566257756bccbc4474c8 (patch)
treec9b7a4dcc9e0b4af17a33ae0c921f31af05855d4 /test/date/test_date_marshal.rb
parentd9dd6f5d350ed90e82345aa9c717fa6fe6db2225 (diff)
downloadruby-5dc5a526125b25200fb6566257756bccbc4474c8.tar.gz
modified tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35880 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/date/test_date_marshal.rb')
-rw-r--r--test/date/test_date_marshal.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/date/test_date_marshal.rb b/test/date/test_date_marshal.rb
index 2f86a8c8c2..4ea5565716 100644
--- a/test/date/test_date_marshal.rb
+++ b/test/date/test_date_marshal.rb
@@ -24,6 +24,18 @@ class TestDateMarshal < Test::Unit::TestCase
assert_equal(d, d2)
assert_equal(d.start, d2.start)
assert_instance_of(String, d2.to_s)
+
+ d = Date.today
+ a = d.marshal_dump
+ d.freeze
+ assert(d.frozen?)
+ assert_raise(RuntimeError){d.marshal_load(a)}
+
+ d = DateTime.now
+ a = d.marshal_dump
+ d.freeze
+ assert(d.frozen?)
+ assert_raise(RuntimeError){d.marshal_load(a)}
end
end