summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2019-01-09 13:25:09 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2019-01-09 13:25:09 -0800
commitbbd6eb07afd3961436b17a1a9c2c4b3606531cdd (patch)
treed8e2c692d55c2dfb88d092180d8555d96db11f74
parent8eb0be0d8dfc8d25facb0db078d9c90d753c6c82 (diff)
downloadpsych-bbd6eb07afd3961436b17a1a9c2c4b3606531cdd.tar.gz
Dumping the backtrace never worked, so remove it
Dumping the backtrace for exceptions never worked, so lets remove it.
-rw-r--r--lib/psych/visitors/yaml_tree.rb24
1 files changed, 10 insertions, 14 deletions
diff --git a/lib/psych/visitors/yaml_tree.rb b/lib/psych/visitors/yaml_tree.rb
index cfed8f1..ed8d9e2 100644
--- a/lib/psych/visitors/yaml_tree.rb
+++ b/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