transfire / gmail.com wrote:

> That's pretty close really. If you can do this (w/o Binding.of_caller
> though b/c it's too fragile).
> 
>    def foo(bar, baz, bur)
>      signature String, Integer, Symbol
>      # something
>    end

Disagreed. I think the signature information should be available before 
you call the method.

Please note that ruby-contract also adds a signature() method to the 
Method and UnboundMethod classes. That would not be possible when the 
signature is inside the actual method. I also think that you can't get 
the above syntax to work because argument order information will be lost.

And I don't think explicit conversion belongs into a type library. It's 
something that ought to be explicitly done by the user IMHO.

-- 
http://flgr.0x42.net/