Issue #8303 has been updated by ayumin (Ayumu AIZAWA).

Category set to ext
Status changed from Open to Assigned
Assignee set to tenderlovemaking (Aaron Patterson)


----------------------------------------
Bug #8303: YAML does not persist Exception#backtrace
https://bugs.ruby-lang.org/issues/8303#change-39698

Author: josh.cheek (Josh Cheek)
Status: Assigned
Priority: Normal
Assignee: tenderlovemaking (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


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 `<main>'"]

end


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