    # File lib/rubygems/specification.rb, line 608
        def self.from_yaml(input)
          input = normalize_yaml_input input
          spec = YAML.load input

          if spec && spec.class == FalseClass then
            raise Gem::EndOfYAMLException
          end

          unless Gem::Specification === spec then
            raise Gem::Exception, "YAML data doesn't evaluate to gem specification"
          end

          unless (spec.instance_variables.include? '@specification_version' or
                  spec.instance_variables.include? :@specification_version) and
                 spec.instance_variable_get :@specification_version
            spec.instance_variable_set :@specification_version,
                                       NONEXISTENT_SPECIFICATION_VERSION
          end

          spec
        end