зеркало из https://github.com/github/ruby.git
* 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:
Родитель
af2f1bf4f9
Коммит
26b8c0890f
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче