End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Psych::Visitors::YAMLTree#visit_DateTime
visit_DateTime(o)
ext/psych/lib/psych/visitors/yaml_tree.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/ext/psych/lib/psych/visitors/yaml_tree.rb, line 195
def visit_DateTime o
formatted = if o.offset.zero?
o.strftime("%Y-%m-%d %H:%M:%S.%9N Z".freeze)
else
o.strftime("%Y-%m-%d %H:%M:%S.%9N %:z".freeze)
end
tag = '!ruby/object:DateTime'
register o, @emitter.scalar(formatted, nil, tag, false, false, Nodes::Scalar::ANY)
end
No documentation available
See also
#visit_Date
#visit_Delegator
#visit_Complex
#visit_Encoding
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1