Q. What will be output for the following code?
Code:
begin
raise 'Exception Created!'
puts 'After Exception'
rescue
puts 'Finally Saved!'
retry
end
β
Correct Answer: (D)
Infinite Loop
Explanation: Be careful while using retry statement because it may result into infinite loop.