From 9a49d7f7232dbf596ce4c64c757d31926a7b4e70 Mon Sep 17 00:00:00 2001 From: akr Date: Thu, 3 Jul 2008 12:10:30 +0000 Subject: [PATCH] new file. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/test_singleton.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/test_singleton.rb diff --git a/test/test_singleton.rb b/test/test_singleton.rb new file mode 100644 index 000000000..bd11095cf --- /dev/null +++ b/test/test_singleton.rb @@ -0,0 +1,15 @@ +require 'test/unit' +require 'singleton' + +class TestSingleton < Test::Unit::TestCase + class C + include Singleton + end + + def test_marshal + o1 = C.instance + m = Marshal.dump(o1) + o2 = Marshal.load(m) + assert_same(o1, o2) + end +end -- 2.11.4.GIT