In article 
<9e3fd2c80805280159y5bad0a73tbc4f845f90246580 / mail.gmail.com>,
 Robert Klemme <shortcutter / googlemail.com> wrote:

> differently) or you can do it with a single method (e.g. if the
> overloading was just there to adjust type - for example on version

And if the types are rather different ducks, would you "case type"?

> are particular requirements you have on arguments passed to methods
> you should check inside the method that receives them.  Note, that for

Yes, but it's uuugly ;)

>   def doit length
>     @l = length.to_int
>   end

Nice, I had forgotten about that one, and to_i won't do as even nil 
answers to it.

> Can you give a more concrete example?

def doit(a, b, c = nil)
  begin
    if c.nil? and b > 0
      c = "ignore"
    elsif b.nil? and c > 0
      uaid = "ignore"
    else
      raise
    end
  rescue RuntimeError, NoMethodError
    raise ArgumentError, "need exactly one number"
  end
  @http.post("first=#{a}&second=#{b}&third=#{c}")
end

-- 
  Tobias Weber