ruby-changes:6339
From: akr <ko1@a...>
Date: Thu, 3 Jul 2008 21:10:41 +0900 (JST)
Subject: [ruby-changes:6339] Ruby:r17855 (trunk): new file.
akr 2008-07-03 21:10:30 +0900 (Thu, 03 Jul 2008)
New Revision: 17855
Added files:
trunk/test/test_singleton.rb
Log:
new file.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=17855
Index: test/test_singleton.rb
===================================================================
--- test/test_singleton.rb (revision 0)
+++ test/test_singleton.rb (revision 17855)
@@ -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
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/