ruby-changes:61142
From: V=C3=ADt <ko1@a...>
Date: Fri, 8 May 2020 14:15:03 +0900 (JST)
Subject: [ruby-changes:61142] 46462200af (master): [rubygems/rubygems] Test that two calls to `stub_for` returns the same (cached) instance.
https://git.ruby-lang.org/ruby.git/commit/?id=46462200af From 46462200afef55fd21b72ad1ff745739b085a793 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@r...> Date: Tue, 27 Aug 2019 13:16:27 +0200 Subject: [rubygems/rubygems] Test that two calls to `stub_for` returns the same (cached) instance. https://github.com/rubygems/rubygems/commit/00b3f55562 diff --git a/test/rubygems/test_gem_specification.rb b/test/rubygems/test_gem_specification.rb index f6caba8..afcdc0d 100644 --- a/test/rubygems/test_gem_specification.rb +++ b/test/rubygems/test_gem_specification.rb @@ -1193,6 +1193,11 @@ dependencies: [] https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_specification.rb#L1193 assert_equal ['b-1'], Gem::Specification.stubs_for('b').map { |s| s.full_name } assert_equal 2, Gem::Specification.class_variable_get(:@@stubs_by_name).length + assert_equal( + Gem::Specification.stubs_for('a').map { |s| s.object_id }, + Gem::Specification.stubs_for('a').map { |s| s.object_id } + ) + Gem.loaded_specs.delete 'a' Gem.loaded_specs.delete 'b' Gem::Specification.class_variable_set(:@@stubs, nil) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/