πŸ“Š Ruby
Q. What does the ensure keyword do in Ruby exception handling?
  • (A) It rescues specific types of exceptions
  • (B) It raises an exception
  • (C) It defines a new module
  • (D) It ensures that a block of code is always executed, regardless of whether an exception is raised or not
πŸ’¬ Discuss
βœ… Correct Answer: (D) It ensures that a block of code is always executed, regardless of whether an exception is raised or not

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
171
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
83%
Success Rate