1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
nobu 2010-02-06 02:41:04 +00:00
parent af2f1bf4f9
commit 26b8c0890f

View file

@ -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