lib/bundler.rb in bundler-1.2.1 vs lib/bundler.rb in bundler-1.2.2

- old
+ new

@@ -290,11 +290,10 @@ # Eval the gemspec from its parent directory Dir.chdir(path.dirname.to_s) do contents = File.read(path.basename.to_s) begin Gem::Specification.from_yaml(contents) - # Raises ArgumentError if the file is not valid YAML - rescue ArgumentError, SyntaxError, Gem::EndOfYAMLException, Gem::Exception + rescue YamlSyntaxError, Gem::EndOfYAMLException, Gem::Exception begin eval(contents, TOPLEVEL_BINDING, path.expand_path.to_s) rescue LoadError, SyntaxError => e original_line = e.backtrace.find { |line| line.include?(path.to_s) } msg = "There was a #{e.class} while evaluating #{path.basename}: \n#{e.message}"