Tom Link wrote:
> I personally would like to see some sort of annotations that could be
> used for this.
> 
> class A
> 
>     S = "FOO"
> 
>     @pre x.respond_to?(:*)
>     @post result.is_a?(String)
>     def fooer(x)
>         S * x
>     end

Yes, this is exactly the sort of thing I'm thinking of. Simple type/duck 
expectations that can be ignored, used for enforcement, or even used for 
optimization. Doing it as doc annotations makes it pretty low-impact.

- Charlie