On Ruby 2.3.4, we find it surprising that exceptions in IRB are swallowed, and are not accessible at the two locations we checked:
In the global variable for most recent exception $!
In the return value of evaluating the expression _
Consider this IRB session:
defmethod_which_raises1/0endmethod_which_raises# ZeroDivisionError: divided by 0# from (irb):10:in `/'# from (irb):10:in `method_which_raises'# from (irb):13# from /Users/marcsiegel/.rubies/ruby-2.3.4/bin/irb:11:in `<main>'
I changed the tracker to "Feature", as I thought it would not need to backport.
But branch maintainers may have different opinion.
It seems easy to apply the commits to the old branches.
Hmm. Our hope would be to have this "easy" change back-ported to 2.3, 2.4, and 2.5 -- waiting until December to have it in final 2.6 seems a long time to wait for this? Please let us know how we can help.