summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-06 02:41:04 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-02-06 02:41:04 +0000
commit26b8c0890f4177f004b40adaad1a412e3f22cb72 (patch)
tree87a709f8428e5c191aaa596d4dc9da6b4197bf7f
parentaf2f1bf4f9fa58aee5a1333c8701eff80071d267 (diff)
* test/test_delegate.rb (TestDelegateClass::IV#initialize): should
set delegation target. * test/test_delegate.rb (TestDelegateClass#test_copy_frozen): clone of frozen delegator also should be frozen. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26591 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/test_delegate.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/test_delegate.rb b/test/test_delegate.rb
index bbabf58968c..6998ac748d1 100644
--- a/test/test_delegate.rb
+++ b/test/test_delegate.rb
@@ -74,6 +74,7 @@ class TestDelegateClass < Test::Unit::TestCase
def initialize
@var = 1
+ super(0)
end
end
@@ -90,6 +91,7 @@ class TestDelegateClass < Test::Unit::TestCase
a = [42, :hello].freeze
d = SimpleDelegator.new(a)
assert_nothing_raised(bug2679) {d.dup[0] += 1}
+ assert_raise(RuntimeError) {d.clone[0] += 1}
end
def test_frozen