diff options
author | xibbar <xibbar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-18 15:18:49 +0000 |
---|---|---|
committer | xibbar <xibbar@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-18 15:18:49 +0000 |
commit | 54e2cb81799f0ff7e443758b50e906ea5b1833d3 (patch) | |
tree | 087b379f7f8cb9662248d3df40ea9a056ec721ab /test/test_delegate.rb | |
parent | b177ff64db1fc467da736f724d196384d1e329f3 (diff) | |
download | ruby-54e2cb81799f0ff7e443758b50e906ea5b1833d3.tar.gz |
add test for {SimpleDelegator, DelegateClass}#class .
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19842 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/test_delegate.rb')
-rw-r--r-- | test/test_delegate.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/test_delegate.rb b/test/test_delegate.rb index 42abbb6f81..0b4c117ebd 100644 --- a/test/test_delegate.rb +++ b/test/test_delegate.rb @@ -17,4 +17,16 @@ class TestDelegateClass < Test::Unit::TestCase e = SystemCallError.new(0) assert((SimpleDelegator.new(e) == e) == (e == SimpleDelegator.new(e)), "[ruby-dev:34808]") end + + class Myclass < DelegateClass(Array);end + + def test_delegateclass_class + myclass=Myclass.new([]) + assert_equal(Myclass,myclass.class) + end + + def test_simpledelegator_class + simple=SimpleDelegator.new([]) + assert_equal(SimpleDelegator,simple.class) + end end |