diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-03-06 07:47:53 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2019-03-06 07:47:53 +0000 |
commit | e0d6392791a4a81091c7e3016312316f1415bf3c (patch) | |
tree | 4a5600958fb47e18d3fe56be50a32b434e74aafe | |
parent | 32f7b501bb269ba3459227323cfb8d1b0f1cdbe9 (diff) |
merge revision(s) 67006: [Backport #15469]
Ignore to add bundler lib direcotry if it is same as rubylibdir.
[Bug #15469][ruby-core:90742]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | lib/bundler/shared_helpers.rb | 2 | ||||
-rw-r--r-- | spec/bundler/bundler/shared_helpers_spec.rb | 9 | ||||
-rw-r--r-- | version.h | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index 3e2fe24b7a..a4c09e36eb 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -340,7 +340,7 @@ module Bundler def set_rubylib rubylib = (ENV["RUBYLIB"] || "").split(File::PATH_SEPARATOR) - rubylib.unshift bundler_ruby_lib + rubylib.unshift bundler_ruby_lib unless RbConfig::CONFIG["rubylibdir"] == bundler_ruby_lib Bundler::SharedHelpers.set_env "RUBYLIB", rubylib.uniq.join(File::PATH_SEPARATOR) end diff --git a/spec/bundler/bundler/shared_helpers_spec.rb b/spec/bundler/bundler/shared_helpers_spec.rb index b66c43fd92..fcac37b398 100644 --- a/spec/bundler/bundler/shared_helpers_spec.rb +++ b/spec/bundler/bundler/shared_helpers_spec.rb @@ -261,6 +261,15 @@ RSpec.describe Bundler::SharedHelpers do subject.set_bundle_environment end + it "ignores if bundler_ruby_lib is same as rubylibdir" do + allow(Bundler::SharedHelpers).to receive(:bundler_ruby_lib).and_return(RbConfig::CONFIG["rubylibdir"]) + + subject.set_bundle_environment + + paths = (ENV["RUBYLIB"]).split(File::PATH_SEPARATOR) + expect(paths.count(RbConfig::CONFIG["rubylibdir"])).to eq(0) + end + it "exits if bundle path contains the unix-like path separator" do if Gem.respond_to?(:path_separator) allow(Gem).to receive(:path_separator).and_return(":") @@ -1,6 +1,6 @@ #define RUBY_VERSION "2.6.1" #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 36 +#define RUBY_PATCHLEVEL 37 #define RUBY_RELEASE_YEAR 2019 #define RUBY_RELEASE_MONTH 3 |