aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Rodríguez <deivid.rodriguez@riseup.net>2022-03-22 14:12:47 +0100
committergit <svn-admin@ruby-lang.org>2022-06-01 17:06:52 +0900
commit89ec3def74cb66e520b027e766e4874a82ddb528 (patch)
tree6eaea70c2af3e4139a105e8bc07aed47d59bda1c
parentebb534801f7032476fa069be11ee1e52f54819f5 (diff)
downloadruby-89ec3def74cb66e520b027e766e4874a82ddb528.tar.gz
[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
-rw-r--r--test/rubygems/test_gem_specification.rb2
1 files changed, 1 insertions, 1 deletions
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