Project

General

Profile

Bug #15469 ยป r15469-bundler-final.patch

hsbt (Hiroshi SHIBATA), 02/05/2019 06:14 AM

View differences:

lib/bundler/shared_helpers.rb
340 340

  
341 341
    def set_rubylib
342 342
      rubylib = (ENV["RUBYLIB"] || "").split(File::PATH_SEPARATOR)
343
      rubylib.unshift bundler_ruby_lib
343
      rubylib.unshift bundler_ruby_lib unless RbConfig::CONFIG["rubylibdir"] == bundler_ruby_lib
344 344
      Bundler::SharedHelpers.set_env "RUBYLIB", rubylib.uniq.join(File::PATH_SEPARATOR)
345 345
    end
346 346

  
spec/bundler/bundler/shared_helpers_spec.rb
261 261
      subject.set_bundle_environment
262 262
    end
263 263

  
264
    it "ignores if bundler_ruby_lib is same as rubylibdir" do
265
      allow(Bundler::SharedHelpers).to receive(:bundler_ruby_lib).and_return(RbConfig::CONFIG["rubylibdir"])
266

  
267
      subject.set_bundle_environment
268

  
269
      paths = (ENV["RUBYLIB"]).split(File::PATH_SEPARATOR)
270
      expect(paths.count(RbConfig::CONFIG["rubylibdir"])).to eq(0)
271
    end
272

  
264 273
    it "exits if bundle path contains the unix-like path separator" do
265 274
      if Gem.respond_to?(:path_separator)
266 275
        allow(Gem).to receive(:path_separator).and_return(":")