mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Improve null private type test
This test is making sure that RubyGems is able to load old marshalled
gemspecs that include a field loading `YAML::PrivateType` instances in
the `rubyforge_project` field instead of `nil` due to a bug in old YAML
emitters.
At some point, the `rubyforge_project` field was removed and this test
was updated to just check another field. However, in the realworld other
fields do not have this issue and the marshalled gemspec we use for
testing still has this issue in the field reserved for the
`rubyforge_project` field. So I think updating the test to check other
field was not correct.
Instead, since the `rubyforge_project` field is now ignored, we no
longer need to worry about any conversion in this field. The only thing
we care about is that the marshal loading still works (which requires
that the constant is at least defined).
So this commit updates the test to make this more clear.
cddfacf6d4
This commit is contained in:
parent
ebb534801f
commit
89ec3def74
1 changed files with 1 additions and 1 deletions
|
|
@ -1072,7 +1072,7 @@ dependencies: []
|
||||||
|
|
||||||
data = Marshal.load Gem::Util.inflate(Gem.read_binary(path))
|
data = Marshal.load Gem::Util.inflate(Gem.read_binary(path))
|
||||||
|
|
||||||
assert_nil data.signing_key
|
assert_instance_of Gem::Specification, data
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_initialize
|
def test_initialize
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue