Sha256: 01e0c23da65443fd32ee0c75e91500ef53613a4b93f4b8dad2839a7adf1daf7e
Contents?: true
Size: 394 Bytes
Versions: 6
Compression:
Stored size: 394 Bytes
Contents
require 'facets/kernel/deep_copy.rb' require 'test/unit' class TestKernelDeepCopy < Test::Unit::TestCase # fixtures for copy / deep_copy class A attr_reader :a def initialize @a = 1 end end class B attr_reader :b def initialize @b = A.new end end def test_deep_copy o = B.new oc = o.deep_copy assert_equal( 1, o.b.a ) end end
Version data entries
6 entries across 6 versions & 1 rubygems