    # File lib/rubygems/dependency_list.rb, line 45
      def dependency_order
        sorted = strongly_connected_components.flatten

        result = []
        seen = {}

        sorted.each do |spec|
          if index = seen[spec.name] then
            if result[index].version < spec.version then
              result[index] = spec
            end
          else
            seen[spec.name] = result.length
            result << spec
          end
        end

        result.reverse
      end