Vidyalelo
Ruby Programming · Q5

Exception Handling in Ruby

Programming · Ruby Programming · question 5

Q5

Which of the following is true about the ensure keyword in Ruby exception handling?

A.
It is used to define a new module
B.
It is used to create a new instance of a class
C.
It is used to execute code regardless of whether an exception occurs or not
Answer
D.
It is used to add module methods to a single object

Answer: Option C

Solution

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