From 56689332960a989148f8d88ef8b7549b5e60e8bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Rodr=C3=ADguez?= Date: Thu, 30 May 2024 11:37:44 +0200 Subject: [PATCH] [rubygems/rubygems] Extract a `spec` variable It's consistent with the previous test and makes print debugging easier. https://github.com/rubygems/rubygems/commit/d7f424df16 --- test/rubygems/test_gem.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/rubygems/test_gem.rb b/test/rubygems/test_gem.rb index b328f158a0..729448e7c2 100644 --- a/test/rubygems/test_gem.rb +++ b/test/rubygems/test_gem.rb @@ -1615,9 +1615,11 @@ class TestGem < Gem::TestCase Gem.use_paths Gem.dir, [Gem.dir, Gem.user_dir] + spec = Gem::Dependency.new("m", "1").to_spec + assert_equal \ File.join(Gem.dir, "gems", "m-1"), - Gem::Dependency.new("m","1").to_spec.gem_dir, + spec.gem_dir, "Wrong spec selected" end