Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'test/unit'
- class FinallySaneTest < Test::Unit::TestCase
- def test_deep_copy
- complex_array = [{:blah => "hello"},{:foo => "blah"}]
- copied_array = Marshal.load(Marshal.dump(complex_array))
- copied_array[0][:blah] = nil
- assert_not_equal copied_array, complex_array
- end
- end
- # 1 tests, 1 assertions, 0 failures, 0 errors
Add Comment
Please, Sign In to add comment