Issue #11347 has been reported by Aleksandar Kostadinov.

----------------------------------------
Bug #11347: Errors with cause not reported properly to console
https://bugs.ruby-lang.org/issues/11347

* Author: Aleksandar Kostadinov
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN
----------------------------------------
Hello, errors with `cause` are an important and very useful feature for debugging. It seems though default reporting is not showing the `cause` and nested causes to user. Here's a test file:
~~~
raise "GAHGAH" rescue raise "error with cause" rescue e=$!

puts "Error: #{e}"
puts "Cause: #{e.cause}"

raise e
~~~

As you can see, the `cause` of the error is not printed in any way to the console when error is raised:
~~~
$ ruby /tmp/test.rb 
Error: error with cause
Cause: GAHGAH
/tmp/test.rb:1:in `rescue in <main>': error with cause (RuntimeError)
	from /tmp/test.rb:1:in `<main>
~~~



-- 
https://bugs.ruby-lang.org/