diff options
-rw-r--r-- | lib/bundler.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb index b821df42..8db58e16 100644 --- a/lib/bundler.rb +++ b/lib/bundler.rb @@ -221,13 +221,13 @@ module Bundler def load_gemspec(file) path = Pathname.new(file) # Eval the gemspec from its parent directory - Dir.chdir(path.dirname) do + Dir.chdir(path.dirname.to_s) do begin - Gem::Specification.from_yaml(path.basename) + Gem::Specification.from_yaml(path.basename.to_s) # Raises ArgumentError if the file is not valid YAML rescue ArgumentError, SyntaxError, Gem::EndOfYAMLException, Gem::Exception begin - eval(File.read(path.basename), TOPLEVEL_BINDING, path.expand_path.to_s) + eval(File.read(path.basename.to_s), TOPLEVEL_BINDING, path.expand_path.to_s) rescue LoadError => e original_line = e.backtrace.find { |line| line.include?(path.to_s) } msg = "There was a LoadError while evaluating #{path.basename}:\n #{e.message}" |