def a
begin
…
rescue Exception => e
puts “a: rescued #{e}”
else
puts “a: no exception”
ensure
puts “a: ensure”
end
end
What should be in place of “…” so that method outputs only “a:
ensure”? Messing with STDIN does not count. This is not a joke, but a
real ruby feature.