Project

General

Profile

Actions

Bug #8303

closed

YAML does not persist Exception#backtrace

Added by josh.cheek (Josh Cheek) over 11 years ago. Updated almost 6 years ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.2.0]
Backport:
[ruby-core:<unknown>]

Description

require 'yaml'

begin
raise "omg"
rescue

yaml loses the backtrace

YAML.load(YAML.dump $!).backtrace # => nil

marshal persists the backtrace

Marshal.load(Marshal.dump $!).backtrace # => ["-:4:in `'"]

end

Actions

Also available in: Atom PDF

Like0
Like0Like0