Q. What will be output for the following code?
Code:
begin
raise 'Exception Created!'
puts 'After Exception'
rescue
puts 'Finally Saved!'
ensure
puts 'ensure block execute'
end
β
Correct Answer: (D)
Finally Saved! ensure block execute
Explanation: The output for the following code is Option D.