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
Now the string is unquoted, which makes it invalid to be parsed back with YAML.safe_load.
I believe this behavior originates from this commit, also because I noticed that manually requiring 'date' before calling .to_yaml still yields the expected result of v5.1.2:
I think the following error probably hints as to where the problem originates from:
irb(main):001> require 'yaml'; Psych::ClassLoader.new.date
/Users/thierry/.asdf/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/psych-5.2.0/lib/psych/class_loader.rb:58:in `path2class': undefined class/module Date (ArgumentError)
path2class(name)
^^^^
from /Users/thierry/.asdf/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/psych-5.2.0/lib/psych/class_loader.rb:58:in `resolve'
from /Users/thierry/.asdf/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/psych-5.2.0/lib/psych/class_loader.rb:50:in `find'
from /Users/thierry/.asdf/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/psych-5.2.0/lib/psych/class_loader.rb:30:in `load'
from /Users/thierry/.asdf/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/psych-5.2.0/lib/psych/class_loader.rb:42:in `date'
from (irb):1:in `<main>'
and that actually, autoload :Date, date probably rather belongs in Psych::ClassLoader than Psych::ScalarScanner. I'll try writing a regression and submit a PR if I succeed
The text was updated successfully, but these errors were encountered:
I've run into the following behavior after upgrading to psych v5.2.0:
With 5.1.2
Observe how the string is quoted in the Yaml file
With 5.2.0
Now the string is unquoted, which makes it invalid to be parsed back with
YAML.safe_load
.I believe this behavior originates from this commit, also because I noticed that manually requiring
'date'
before calling.to_yaml
still yields the expected result ofv5.1.2
:I think the following error probably hints as to where the problem originates from:
and that actually,
autoload :Date, date
probably rather belongs inPsych::ClassLoader
thanPsych::ScalarScanner
. I'll try writing a regression and submit a PR if I succeedThe text was updated successfully, but these errors were encountered: