Intermediate
Ruby
Q66 / 100
What does "begin ... rescue ... ensure ... end" guarantee about the "ensure" block?
Correct! Well done.
Incorrect.
The correct answer is B) It always runs, whether or not an exception was raised or rescued, similar to "finally" in other languages
B
Correct Answer
It always runs, whether or not an exception was raised or rescued, similar to "finally" in other languages
Explanation
The ensure clause executes regardless of whether an exception occurred, was rescued, or the method returned normally — typically used for cleanup.
Progress
66/100