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:
parent
af2f1bf4f9
commit
26b8c0890f
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue