Skip to content

Commit 38cc4e0

Browse files
authored
Use RUBY_BASE_NAME, since that is what the libdir uses (#38)
1 parent 4f05aac commit 38cc4e0

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ruby/private/bundle/create_bundle_build_file.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@
6868
#
6969
# Library path differs across implementations as `lib/ruby` on MRI and `lib/jruby` on JRuby.
7070
GEM_PATH = ->(ruby_version, gem_name, gem_version) do
71-
glob = Dir.glob("lib/#{RbConfig::CONFIG['RUBY_INSTALL_NAME']}/#{ruby_version}/gems/#{gem_name}-#{gem_version}*").first
72-
alt_glob = Dir.glob("lib/#{RbConfig::CONFIG['RUBY_INSTALL_NAME']}/#{ruby_version}/bundler/gems/#{gem_name}-*").first
71+
glob = Dir.glob("lib/#{RbConfig::CONFIG['RUBY_BASE_NAME']}/#{ruby_version}/gems/#{gem_name}-#{gem_version}*").first
72+
alt_glob = Dir.glob("lib/#{RbConfig::CONFIG['RUBY_BASE_NAME']}/#{ruby_version}/bundler/gems/#{gem_name}-*").first
7373
glob || alt_glob
7474
end
7575

@@ -83,8 +83,8 @@
8383
#
8484
# Library path differs across implementations as `lib/ruby` on MRI and `lib/jruby` on JRuby.
8585
SPEC_PATH = ->(ruby_version, gem_name, gem_version) do
86-
glob = Dir.glob("lib/#{RbConfig::CONFIG['RUBY_INSTALL_NAME']}/#{ruby_version}/specifications/#{gem_name}-#{gem_version}*.gemspec").first
87-
alt_glob = Dir.glob("lib/#{RbConfig::CONFIG['RUBY_INSTALL_NAME']}/#{ruby_version}/bundler/gems/#{gem_name}-*/**/*.gemspec").first
86+
glob = Dir.glob("lib/#{RbConfig::CONFIG['RUBY_BASE_NAME']}/#{ruby_version}/specifications/#{gem_name}-#{gem_version}*.gemspec").first
87+
alt_glob = Dir.glob("lib/#{RbConfig::CONFIG['RUBY_BASE_NAME']}/#{ruby_version}/bundler/gems/#{gem_name}-*/**/*.gemspec").first
8888
glob || alt_glob
8989
end
9090

@@ -199,13 +199,13 @@ def initialize(workspace_name:,
199199
# ruby/2.6.0/gems for all minor versions of 2.6.*
200200
@ruby_version ||= begin
201201
version_string = (RUBY_VERSION.split('.')[0..1] << 0).join('.')
202-
if File.exist?("lib/#{RbConfig::CONFIG['RUBY_INSTALL_NAME']}/#{version_string}")
202+
if File.exist?("lib/#{RbConfig::CONFIG['RUBY_BASE_NAME']}/#{version_string}")
203203
version_string
204204
else
205-
if File.exist?("lib/#{RbConfig::CONFIG['RUBY_INSTALL_NAME']}/#{version_string}+0")
205+
if File.exist?("lib/#{RbConfig::CONFIG['RUBY_BASE_NAME']}/#{version_string}+0")
206206
version_string + "+0"
207207
else
208-
raise "Cannot find directory named #{version_string} within lib/#{RbConfig::CONFIG['RUBY_INSTALL_NAME']}"
208+
raise "Cannot find directory named #{version_string} within lib/#{RbConfig::CONFIG['RUBY_BASE_NAME']}"
209209
end
210210
end
211211
end

0 commit comments

Comments
 (0)