Skip to content

Conversation

@epistrephein
Copy link
Contributor

@epistrephein epistrephein commented Nov 10, 2025

In _data/releases.yml, 3 of the total 229 dates under the date: key are written with quotes instead of without quotes.

This has the side effect that when the file is YAML-parsed, these dates are parsed as Strings instead of Dates, creating an unwanted inconsistency of classes.

This PR normalizes the 3 dates removing the quotes so that they're all parsed as Date class.

require 'yaml'
yaml = YAML.unsafe_load_file('_data/releases.yml')

# master
yaml.filter_map { |i| i['version'] unless i['date'].is_a?(Date) }
# => ["3.3.10", "3.3.9", "3.2.9"]
yaml.find { |i| i['version'] == '3.3.9' }['date']
# => "2025-07-24"


# this branch
yaml.filter_map { |i| i['version'] unless i['date'].is_a?(Date) }
# => []
yaml.find { |i| i['version'] == '3.3.9' }['date']
# => #<Date: 2025-07-24 ((2460881j,0s,0n),+0s,-Infj)>

(see #3566, #3375 and #3146 for the same fix some time ago)

@epistrephein epistrephein requested a review from a team as a code owner November 10, 2025 14:31
@epistrephein epistrephein changed the title Normalize all dates to Date instead of String [Data] Normalize all dates to Date instead of String Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant