# File lib/rubygems/gem_commands.rb, line 747 def load_gemspecs(filename) if yaml?(filename) require 'yaml' result = [] open(filename) do |f| begin while spec = Gem::Specification.from_yaml(f) result << spec end rescue EndOfYAMLException => e # OK end end else result = [Gem::Specification.load(filename)] end result end