πŸ“Š Ruby
Q. What is the purpose of the ensure keyword in Ruby?
  • (A) To create a new instance of a class
  • (B) To define a new module
  • (C) To execute code regardless of whether an exception occurs or not
  • (D) To handle exceptions and execute alternative code paths
πŸ’¬ Discuss
βœ… Correct Answer: (C) To execute code regardless of whether an exception occurs or not

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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