class Gem::Package::Old
def spec
def spec verify return @spec if @spec yaml = String.new @gem.with_read_io do |io| skip_ruby io read_until_dashes io do |line| yaml << line end end yaml_error = if RUBY_VERSION < '1.9' then YAML::ParseError elsif YAML.const_defined?(:ENGINE) && YAML::ENGINE.yamler == 'syck' then YAML::ParseError else YAML::SyntaxError end begin @spec = Gem::Specification.from_yaml yaml rescue yaml_error raise Gem::Exception, "Failed to parse gem specification out of gem file" end rescue ArgumentError raise Gem::Exception, "Failed to parse gem specification out of gem file" end