This prints an empty array ([]):
trap("SIGINT") do
p caller
exit!
end
However, I can get the real stacktrace by raising and rescuing an error:
trap("SIGINT") do
begin
raise "oops"
rescue Exception => e
p e.backtrace
end
exit!
end
Version
$ jruby --version
jruby 1.7.3 (1.9.3p385) 2013-02-21 dac429b on Java HotSpot(TM) 64-Bit Server VM 1.6.0_43-b01 [linux-amd64]
This prints an empty array (
[]):However, I can get the real stacktrace by raising and rescuing an error:
Version