From 347c117793b4681416501e67ecb2c832709b37b4 Mon Sep 17 00:00:00 2001 From: Samuel Giddins Date: Wed, 24 Feb 2016 19:21:47 -0600 Subject: Ensure loaded_from is always set to a string --- lib/bundler.rb | 2 +- spec/bundler/bundler_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/bundler.rb b/lib/bundler.rb index a90bc5486d..2958e64cee 100644 --- a/lib/bundler.rb +++ b/lib/bundler.rb @@ -361,7 +361,7 @@ module Bundler eval_gemspec(path, contents) end return unless spec - spec.loaded_from = file + spec.loaded_from = path.expand_path.to_s Bundler.rubygems.validate(spec) if validate spec end diff --git a/spec/bundler/bundler_spec.rb b/spec/bundler/bundler_spec.rb index 9b1cca5f12..84d2922f37 100644 --- a/spec/bundler/bundler_spec.rb +++ b/spec/bundler/bundler_spec.rb @@ -84,7 +84,7 @@ describe Bundler do GEMSPEC end - expect(subject.loaded_from).to eq(app_gemspec_path) + expect(subject.loaded_from).to eq(app_gemspec_path.expand_path.to_s) end context "validate is true" do -- cgit v1.2.1