End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Psych::Visitors::YAMLTree#visit_Complex
visit_Complex(o)
ext/psych/lib/psych/visitors/yaml_tree.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/ext/psych/lib/psych/visitors/yaml_tree.rb, line 223
def visit_Complex o
register o, @emitter.start_mapping(nil, '!ruby/object:Complex', false, Nodes::Mapping::BLOCK)
['real', o.real.to_s, 'image', o.imag.to_s].each do |m|
@emitter.scalar m, nil, nil, true, false, Nodes::Scalar::ANY
end
@emitter.end_mapping
end
No documentation available
See also
#visit_Class
#visit_Date
#visit_BigDecimal
#visit_DateTime
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0