Examveda
Examveda

What is the purpose of the rescue keyword in Ruby?

A. To handle exceptions and execute alternative code paths

B. To define a new module

C. To create a new instance of a class

D. To add module methods to a single object

Answer: Option A


This Question Belongs to Ruby Programming >> Exception Handling In Ruby

Join The Discussion

Related Questions on Exception Handling in Ruby

What is an exception in Ruby?

A. A way to group related methods and constants

B. A method for defining variables

C. An unexpected event that disrupts the normal flow of the program

D. A predefined object in Ruby