JRuby had supported duck-typing of java.lang.Throwable hierarchy, to act like Ruby's Exception, for a long time.
There's java.lang.Throwable#backtrace which maps the Java stack-trace into an Array.
The backtrace_locations method are a later Ruby language feature and so wasn't considered for addiiton.
It would be desired to support backtrace_location with JRuby's Java integration as well, esp. since frameworks such as Rails might do rescue Exception (which catched Java throwables) and assume backtrace_locations exists.
JRuby had supported duck-typing of
java.lang.Throwablehierarchy, to act like Ruby'sException, for a long time.There's
java.lang.Throwable#backtracewhich maps the Java stack-trace into an Array.The
backtrace_locationsmethod are a later Ruby language feature and so wasn't considered for addiiton.It would be desired to support
backtrace_locationwith JRuby's Java integration as well, esp. since frameworks such as Rails might dorescue Exception(which catched Java throwables) and assumebacktrace_locationsexists.