Complete the code to create a shallow copy of the object using the correct method.
copy = original.[1]The dup method creates a shallow copy of the object without copying its singleton methods.
Complete the code to create a copy of the object including its singleton methods.
copy = original.[1]The clone method copies the object including its singleton methods and frozen state.
Fix the error in the code to correctly duplicate the object without copying singleton methods.
new_obj = obj.[1]The dup method duplicates the object without copying singleton methods, which is the intended behavior here.
Fill both blanks to create a clone of the object and check if the clone is frozen.
cloned_obj = obj.[1] is_frozen = cloned_obj.[2]
clone creates a copy including singleton methods, and frozen? checks if the object is frozen.
Fill all three blanks to duplicate an object, freeze the duplicate, and check if it is frozen.
duplicate = obj.[1] duplicate.[2] is_frozen = duplicate.[3]
dup duplicates the object without singleton methods, freeze makes the object immutable, and frozen? checks if it is frozen.