# File lib/rubygems/package/old.rb, line 133
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
begin
@spec = Gem::Specification.from_yaml yaml
rescue YAML::SyntaxError
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