これで同じにはなる。

bt = e.backtrace
puts("#{bt[0]}: #{e.message} (#{e.class.to_s})")
1.upto(bt.length - 1) { |i| puts("\tfrom #{bt[i]}") }