Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
instance method
Psych::Visitors::YAMLTree#dump_exception
dump_exception(o, msg)
ext/psych/lib/psych/visitors/yaml_tree.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/ext/psych/lib/psych/visitors/yaml_tree.rb, line 499
def dump_exception o, msg
tag = ['!ruby/exception', o.class.name].join ':'
@emitter.start_mapping nil, tag, false, Nodes::Mapping::BLOCK
if msg
@emitter.scalar 'message', nil, nil, true, false, Nodes::Scalar::ANY
accept msg
end
@emitter.scalar 'backtrace', nil, nil, true, false, Nodes::Scalar::ANY
accept o.backtrace
dump_ivars o
@emitter.end_mapping
end
No documentation available