Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #4467. Exception backtrace is nil when it should be present.
We need to back off on this optimization in cases where the exception list exists. Statically, we cannot know if StandardError is really a builtin one or it has been overridden. Even beyond that we had no logic ensuring it was even StandardError-based exception so we would kill backtraces that an outer begin/rescue might want to catch and look at the backtrace. Bare rescues and rescue_mods still are fast which was the main motivation for this optimization.