Check the object_id before and after the assignment : object_id « Reflection « Ruby
- Ruby
- Reflection
- object_id
Check the object_id before and after the assignment
call = "All hands on deck!" # => "All hands on deck!"
call.object_id # => 1600420
call = "All feet on deck!" # => "All feet on deck!"
call.object_id # => 1009410
Related examples in the same category