Bug #8303

YAML does not persist Exception#backtrace

Added by Josh Cheek about 1 year ago. Updated 11 months ago.

[ruby-core:<unknown>]
Status:Assigned
Priority:Normal
Assignee:Aaron Patterson
Category:ext
Target version:-
ruby -v:ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.2.0] Backport:1.9.3: UNKNOWN, 2.0.0: 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

History

#1 Updated by Ayumu AIZAWA 11 months ago

  • Category set to ext
  • Status changed from Open to Assigned
  • Assignee set to Aaron Patterson

Also available in: Atom PDF