From 55b95b0169fee1cf10f8c67ead1c93e16a686194 Mon Sep 17 00:00:00 2001 From: akr Date: Thu, 3 Jul 2008 12:10:30 +0000 Subject: new file. git-svn-id: svn+ssh://ci.ruby-lang.org/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 (limited to 'test/test_singleton.rb') diff --git a/test/test_singleton.rb b/test/test_singleton.rb new file mode 100644 index 0000000000..bd11095cf2 --- /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 -- cgit v1.2.3