# File lib/multimethod/multimethod.rb, line 147
    def lookup_method_(args)
      scores = score_methods(@method, args)
      if scores.empty?
        # Method not found.
        result = nil
      else
        # Check for ambiguous methods.
        if result = ambiguous_methods(scores)
          raise NameError, "Ambiguous methods for multimethod '#{@name}' for (#{args.collect{|x| x.name}.join(', ')}): #{result.collect{|x| x.to_s}.join(', ')}"
        end

        # Select best scoring method.
        result = scores[0][1]
      end

      #if @name.to_s == 'bar'
      #  $stderr.puts "args = " + args.collect{|x| x.class.name + ' ' + x.to_s}.join(",  ")
      #  $stderr.puts "scores:\n  " + scores.collect{|x| x.inspect}.join("\n  ")
      # end


      result
    end