Intermediate Ruby
Q68 / 100

What does "Kernel#freeze" combined with constants help prevent?

Correct! Well done.

Incorrect.

The correct answer is B) Accidental mutation of objects assigned to constants, since constants themselves can still be reassigned but their referenced object can be frozen against mutation

B

Correct Answer

Accidental mutation of objects assigned to constants, since constants themselves can still be reassigned but their referenced object can be frozen against mutation

Explanation

Even though Ruby constants can technically be reassigned (with a warning), freezing the object they reference prevents in-place mutation of that object's state.

Progress
68/100