Skip to content

YAML.dump(date) generates warnings with Rails 7.0.7+ #644

Description

@BrianHawley

Psych serializes Date values with to_s, and just assumes that to_s generates ISO-8601 format dates. This is a little presumptuous of Psych, in my opinion, given that ActiveSupport in Rails overrides to_s with a method that can return strings in different formats.

It sound be better for Psych to serialize Date values with strftime('%F') rather than to_s, so it's less likely to break.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions