Vidyalelo
Ruby Programming · Q15

Exception Handling in Ruby

Programming · Ruby Programming · question 15

Q15

What happens if an exception is raised within an ensure block in Ruby?

A.
The exception is handled by an outer rescue block, if present
Answer
B.
The program terminates with an error message
C.
The program continues execution as normal
D.
The program enters a loop to retry the operation

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board