def check_object(object)
      if !object.respond_to?(name)
        raise NotImplementedErrorCheckError.new(self,
            "method '#{name}' not responding in #{object}")
      end
      check_method = object.method(name)
      if arity and (check_arity = check_method.arity) != arity
        raise ArgumentErrorCheckError.new(self,
            "wrong number of arguments for protocol"\
            " in method '#{name}' (#{check_arity} for #{arity}) of #{object}")
      end
      if block_expected?
        if object.singleton_methods(false).map { |m| m.to_s } .include?(name)
          parser = MethodParser.new(object, name, true)
        else
          ancestors = object.class.ancestors
          modul = Utilities.find_method_module(name, ancestors)
          parser = MethodParser.new(modul, name)
        end
        parser.block_arg? or raise BlockCheckError.new(self,
          "expected a block argument for #{object}:#{object.class}")
      end
      if arity and not protocol === object
        object.extend protocol
        wrap_method(class << object ; self ; end)
      end
      true
    end
def check_object(object)
      if !object.respond_to?(name)
        raise NotImplementedErrorCheckError.new(self,
            "method '#{name}' not responding in #{object}")
      end
      check_method = object.method(name)
      if arity and (check_arity = check_method.arity) != arity
        raise ArgumentErrorCheckError.new(self,
            "wrong number of arguments for protocol"\
            " in method '#{name}' (#{check_arity} for #{arity}) of #{object}")
      end
      if block_expected?
        if object.singleton_methods(false).map { |m| m.to_s } .include?(name)
          parser = MethodParser.new(object, name, true)
        else
          ancestors = object.class.ancestors
          modul = Utilities.find_method_module(name, ancestors)
          parser = MethodParser.new(modul, name)
        end
        parser.block_arg? or raise BlockCheckError.new(self,
          "expected a block argument for #{object}:#{object.class}")
      end
      if arity and not protocol === object
        object.extend protocol
        wrap_method(class << object ; self ; end)
      end
      true
    end
Check object +object+ against this Message instance, and raise a
 CheckError exception if necessary.