Vidyalelo
Ruby Programming · Q18

Exception Handling in Ruby

Programming · Ruby Programming · question 18

Q18

What is the purpose of the ensure keyword in Ruby exception handling?

A.
To define a new module
B.
To execute code regardless of whether an exception occurs or not
Answer
C.
To create a new instance of a class
D.
None of the above

Answer: Option B

Solution

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