You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
metadata:
title: 'Resolutions of the CGPM: 1st meeting'date: 1889-09-28source: BIPM - Pavillon de Breteuilurl: https://www.bipm.org/en/CGPM/db/1resolutions:
- dates:
- 1889-09-28
The 1889-09-28 date instances will fail on YAML.load like this:
Failure/Error: YAML.load_file(Pathname.new(f).expand_path.to_s)
Psych::DisallowedClass:
Tried to load unspecified class: Date
# (eval):2:in `date'
# ./spec/bipm/data/importer/cgpm_spec.rb:8:in `block (2 levels) in <top (required)>'
# ./spec/bipm/data/importer/cgpm_spec.rb:6:in `map'
# ./spec/bipm/data/importer/cgpm_spec.rb:6:in `block in <top (required)>'
# ./spec/bipm/data/importer/cgpm_spec.rb:3:in `<top (required)>'
The reason is the Psych YAML parser at Ruby has the following bug but it was never fixed, for 6 years! ruby/psych#262
In that ticket some suggested that only "invalid dates" will raise this issue, but the case is all dates will cause this issue. This is frustrating because the YAML spec does support the "Date" type.
Simply speaking:
irb(main):004:0> YAML.load("1900-01-01")
~/.rbenv/versions/3.1.0/lib/ruby/3.1.0/psych/class_loader.rb:99:in `find': Tried to load unspecified class: Date (Psych::DisallowedClass)
The text was updated successfully, but these errors were encountered:
The
1889-09-28
date instances will fail on YAML.load like this:The reason is the Psych YAML parser at Ruby has the following bug but it was never fixed, for 6 years!
ruby/psych#262
In that ticket some suggested that only "invalid dates" will raise this issue, but the case is all dates will cause this issue. This is frustrating because the YAML spec does support the "Date" type.
Simply speaking:
The text was updated successfully, but these errors were encountered: