summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-03 12:10:30 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-03 12:10:30 +0000
commit78f43abdd81129fbdee012f7d7460cd37b455128 (patch)
treeba43636a127c262045c3620875a5178e14e3ab32
parent748b71acb43c19b2f8563759d252b366b73e316e (diff)
downloadruby-78f43abdd81129fbdee012f7d7460cd37b455128.tar.gz
ruby-78f43abdd81129fbdee012f7d7460cd37b455128.tar.xz
ruby-78f43abdd81129fbdee012f7d7460cd37b455128.zip
new file.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/test_singleton.rb15
1 files changed, 15 insertions, 0 deletions
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