diff options
| author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2024-11-18 18:18:23 +0900 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2024-11-18 20:46:07 +0900 |
| commit | c17ab1eea048105c256a115f4127802b5c283fcc (patch) | |
| tree | 7efe9cd454588bb79e987be2db46b92d7cdc4bdd | |
| parent | 1a416920f19acccaa7600a6c1e841a198decb50e (diff) | |
Fixed required path with example location
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12111
| -rw-r--r-- | spec/bundled_gems_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/bundled_gems_spec.rb b/spec/bundled_gems_spec.rb index 8062ccf1bc..22a35dd498 100644 --- a/spec/bundled_gems_spec.rb +++ b/spec/bundled_gems_spec.rb @@ -247,7 +247,7 @@ RSpec.describe "bundled_gems.rb" do build_lib "childprocess", "5.0.0" do |s| # bootsnap expand required feature to full path # require 'logger' - rubylibpath = File.expand_path(File.join(__dir__, "..", "..", "lib")) + rubylibpath = File.expand_path(File.join(__dir__, "..", "lib")) s.write "lib/childprocess.rb", "require '#{rubylibpath}/logger'" end @@ -274,7 +274,7 @@ RSpec.describe "bundled_gems.rb" do end it "Show warning with zeitwerk" do - libpath = Dir[File.expand_path(File.join(__dir__, "..", "..", ".bundle", "gems/{zeitwerk}-*/lib"))].map(&:to_s).first + libpath = Dir[File.expand_path("../.bundle/gems/{zeitwerk}-*/lib", __dir__)].map(&:to_s).first code = <<-RUBY $LOAD_PATH.unshift("#{libpath}") require "zeitwerk" |
