diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2019-01-09 13:25:09 -0800 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-06-25 15:56:20 +0900 |
commit | 4bd190942710725a79ca61fb30cff152888b55d0 (patch) | |
tree | 1f6513261892ddc5ee1e896373e88ea7ae1c06ad /ext/psych | |
parent | d118c84b0b9110462e479487ffaf175a75e5718e (diff) | |
download | ruby-4bd190942710725a79ca61fb30cff152888b55d0.tar.gz |
Dumping the backtrace never worked, so remove it
Dumping the backtrace for exceptions never worked, so lets remove it.
Diffstat (limited to 'ext/psych')
-rw-r--r-- | ext/psych/lib/psych/visitors/yaml_tree.rb | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/ext/psych/lib/psych/visitors/yaml_tree.rb b/ext/psych/lib/psych/visitors/yaml_tree.rb index cfed8f1814..ed8d9e2dfe 100644 --- a/ext/psych/lib/psych/visitors/yaml_tree.rb +++ b/ext/psych/lib/psych/visitors/yaml_tree.rb @@ -185,13 +185,11 @@ module Psych @emitter.start_mapping nil, tag, false, Nodes::Mapping::BLOCK - { - 'message' => private_iv_get(o, 'mesg'), - 'backtrace' => private_iv_get(o, 'backtrace'), - }.each do |k,v| - next unless v - @emitter.scalar k, nil, nil, true, false, Nodes::Scalar::ANY - accept v + msg = private_iv_get(o, 'mesg') + + if msg + @emitter.scalar 'message', nil, nil, true, false, Nodes::Scalar::ANY + accept msg end dump_ivars o @@ -204,13 +202,11 @@ module Psych @emitter.start_mapping nil, tag, false, Nodes::Mapping::BLOCK - { - 'message' => o.message.to_s, - 'backtrace' => private_iv_get(o, 'backtrace'), - }.each do |k,v| - next unless v - @emitter.scalar k, nil, nil, true, false, Nodes::Scalar::ANY - accept v + msg = o.message.to_s + + if msg + @emitter.scalar 'message', nil, nil, true, false, Nodes::Scalar::ANY + accept msg end dump_ivars o |