From 89ec3def74cb66e520b027e766e4874a82ddb528 Mon Sep 17 00:00:00 2001 From: David Rodríguez Date: Tue, 22 Mar 2022 14:12:47 +0100 Subject: [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. https://github.com/rubygems/rubygems/commit/cddfacf6d4 --- test/rubygems/test_gem_specification.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb index 103d886537..8591957245 100644 --- a/test/rubygems/test_gem_specification.rb +++ b/test/rubygems/test_gem_specification.rb @@ -1072,7 +1072,7 @@ dependencies: [] data = Marshal.load Gem::Util.inflate(Gem.read_binary(path)) - assert_nil data.signing_key + assert_instance_of Gem::Specification, data end def test_initialize -- cgit v1.2.3