    # File lib/rubygems.rb, line 442
      def self.load_path_insert_index
        index = $LOAD_PATH.index ConfigMap[:sitelibdir]

        $LOAD_PATH.each_with_index do |path, i|
          if path.instance_variables.include?(:@gem_prelude_index) or
            path.instance_variables.include?('@gem_prelude_index') then
            index = i
            break
          end
        end

        index
      end