summaryrefslogtreecommitdiff
path: root/lib/rubygems/test_case.rb
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-03-14 12:34:03 -0500
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-08-17 07:35:48 +0900
commit00cd5d74cecb6aa4a184e57e2b8246ef6e45d458 (patch)
tree2ff487a4b5e474ddd17bf2e083b4722d1a746b2b /lib/rubygems/test_case.rb
parentd4feeb19361a4d7addf4779fb6bdc8e8c072093b (diff)
[rubygems/rubygems] [Require] Ensure -I beats a default gem
https://github.com/rubygems/rubygems/commit/6fbda98eb3
Diffstat (limited to 'lib/rubygems/test_case.rb')
-rw-r--r--lib/rubygems/test_case.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/rubygems/test_case.rb b/lib/rubygems/test_case.rb
index b6bb7ca93ee..4b43df539d1 100644
--- a/lib/rubygems/test_case.rb
+++ b/lib/rubygems/test_case.rb
@@ -739,6 +739,7 @@ class Gem::TestCase < (defined?(Minitest::Test) ? Minitest::Test : MiniTest::Uni
spec.files = files
lib_dir = File.join(@tempdir, "default_gems", "lib")
+ lib_dir.instance_variable_set(:@gem_prelude_index, lib_dir)
$LOAD_PATH.unshift(lib_dir)
files.each do |file|
rb_path = File.join(lib_dir, file)