diff options
| author | Takashi Kokubun <takashikkbn@gmail.com> | 2025-12-11 17:45:07 -0800 |
|---|---|---|
| committer | Takashi Kokubun <takashikkbn@gmail.com> | 2025-12-11 17:45:14 -0800 |
| commit | faac344d1698b3f6b7e2bd8afbca1b7fbc46b9df (patch) | |
| tree | ed7823a3dc47e329218eb18fc7854f4acd6dc45d /tool | |
| parent | 3a76625915e57eb328d23ae5dd621d8bf45b30e0 (diff) | |
make-snapshot: Fix Psych::DisallowedClass with newer psych
```
$ tool/format-release ../www.ruby-lang.org 4.0.0-preview2 .
/opt/rubies/3.4.6/lib/ruby/3.4.0/psych/class_loader.rb:99:in 'Psych::ClassLoader::Restricted#find': Tried to load unspecified class: Date (Psych::DisallowedClass)
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/class_loader.rb:28:in 'Psych::ClassLoader#load'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/class_loader.rb:40:in 'Psych::ClassLoader#date'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/scalar_scanner.rb:65:in 'Psych::ScalarScanner#tokenize'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:65:in 'Psych::Visitors::ToRuby#deserialize'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:129:in 'Psych::Visitors::ToRuby#visit_Psych_Nodes_Scalar'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/visitor.rb:30:in 'Psych::Visitors::Visitor#visit'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/visitor.rb:6:in 'Psych::Visitors::Visitor#accept'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:35:in 'Psych::Visitors::ToRuby#accept'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:346:in 'block in Psych::Visitors::ToRuby#revive_hash'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:344:in 'Array#each'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:344:in 'Enumerable#each_slice'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:344:in 'Psych::Visitors::ToRuby#revive_hash'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:168:in 'Psych::Visitors::ToRuby#visit_Psych_Nodes_Mapping'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/visitor.rb:30:in 'Psych::Visitors::Visitor#visit'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/visitor.rb:6:in 'Psych::Visitors::Visitor#accept'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:35:in 'Psych::Visitors::ToRuby#accept'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:339:in 'block in Psych::Visitors::ToRuby#register_empty'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:339:in 'Array#each'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:339:in 'Psych::Visitors::ToRuby#register_empty'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:147:in 'Psych::Visitors::ToRuby#visit_Psych_Nodes_Sequence'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/visitor.rb:30:in 'Psych::Visitors::Visitor#visit'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/visitor.rb:6:in 'Psych::Visitors::Visitor#accept'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:35:in 'Psych::Visitors::ToRuby#accept'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:319:in 'Psych::Visitors::ToRuby#visit_Psych_Nodes_Document'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/visitor.rb:30:in 'Psych::Visitors::Visitor#visit'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/visitor.rb:6:in 'Psych::Visitors::Visitor#accept'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych/visitors/to_ruby.rb:35:in 'Psych::Visitors::ToRuby#accept'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych.rb:336:in 'Psych.safe_load'
from /opt/rubies/3.4.6/lib/ruby/3.4.0/psych.rb:371:in 'Psych.load'
from tool/format-release:80:in 'Tarball.parse'
from tool/format-release:269:in 'Object#main'
from tool/format-release:272:in '<main>'
```
Diffstat (limited to 'tool')
| -rwxr-xr-x | tool/format-release | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/format-release b/tool/format-release index b38263f9f4..0505df700b 100755 --- a/tool/format-release +++ b/tool/format-release @@ -77,7 +77,7 @@ eom end uri = "https://cache.ruby-lang.org/pub/tmp/ruby-info-#{version}-draft.yml" - info = YAML.load(URI(uri).read) + info = YAML.unsafe_load(URI(uri).read) if info.size != 1 raise "unexpected info.yml '#{uri}'" end |
