[rubygems/rubygems] Remove no longer needed `Psych::PrivateType` cleanup

This old bug used to affect the `rubyforge_project` field in serialized
gemspecs. However, this field has been removed and it's no longer
present in marshaled loaded gemspecs.

So, while the constant is still present in these marshalled gemspecs and
we still need to make sure it exists, we no longer need to clean it up
from the loaded data.

https://github.com/rubygems/rubygems/commit/09df18e522
This commit is contained in:
David Rodríguez 2022-03-22 13:52:19 +01:00 коммит произвёл git
Родитель 936e54063d
Коммит ebb534801f
1 изменённых файлов: 0 добавлений и 5 удалений

Просмотреть файл

@ -1289,11 +1289,6 @@ class Gem::Specification < Gem::BasicSpecification
raise TypeError, "invalid Gem::Specification format #{array.inspect}"
end
# Cleanup any Psych::PrivateType. They only show up for an old bug
# where nil => null, so just convert them to nil based on the type.
array.map! {|e| e.kind_of?(Psych::PrivateType) ? nil : e }
spec.instance_variable_set :@rubygems_version, array[0]
# spec version
spec.instance_variable_set :@name, array[2]