Duck-typing can be boiled down to: The type of a parameter to a function is defined by the methods that will be called on it, not by its class.
E.g. if you have:
def foo source
dosomething(source.shift)
end
Then absent additional restrictions inferred from requirements of dosomething(), the class of "source" is irrelevant. The relevant type information is whether or not "source" responds to "shift".A proper Ruby-ish type checker will need to be able to handle that, or it'll push people to write non-idiomatic Ruby.