    # File lib/rubygems/specification.rb, line 1009
        def add_dependency_with_type(dependency, type, *requirements)
          requirements = if requirements.empty? then
                           Gem::Requirement.default
                         else
                           requirements.flatten
                         end

          unless dependency.respond_to?(:name) &&
            dependency.respond_to?(:version_requirements)

            dependency = Dependency.new(dependency, requirements, type)
          end

          dependencies << dependency
        end