Deep copy of arrays in Ruby Deep copy of arrays in Ruby arrays arrays

Deep copy of arrays in Ruby


Easy!

@new_tt            = tt2.clone@new_tt.patients   = tt2.patients.dup@new_tt.doctors    = tt2.doctors.dup@new_tt.hospitals  = tt2.hospitals.dup@new_tt.save


Ruby Facets is a set of useful extensions to Ruby and has a deep_clone method that might work for you.