# File lib/bundler.rb, line 288 def load_gemspec_uncached(file) path = Pathname.new(file) # Eval the gemspec from its parent directory Dir.chdir(path.dirname.to_s) do contents = File.read(path.basename.to_s) if contents =~ /\A---/ # try YAML begin Gem::Specification.from_yaml(contents) rescue ArgumentError, YamlSyntaxError, Gem::EndOfYAMLException, Gem::Exception eval_gemspec(path, contents) end else eval_gemspec(path, contents) end end end