Actions
Bug #9855
closednested hash with clone method , it act as a reference but object id are different
Description
there is a problem with nested hash ,
when i clone a nested hash it act as a reference an when i remove an element from the cloned newly created hash , the previous hash is same as newly create hash.
there object id are different
i am sending the screenshot of the problem that i face
Files
Updated by marcandre (Marc-Andre Lafortune) over 10 years ago
- Status changed from Open to Rejected
- Assignee deleted (
ephoenix (Evan Phoenix))
This is expected behavior. clone
is only a shallow clone and thus the values of a hash are not cloned themselves.
Actions
Like0
Like0