danielpclark / rutie

“The Tie Between Ruby and Rust.”
MIT License
938 stars 62 forks source link

methods! now uses :ty for return type instead of :ident #148

Closed n8ta closed 2 years ago

n8ta commented 3 years ago

The methods! macro uses :ident to match the return type of the functions passed into it. It should use :ty instead.

Here's an example of where the current methods! won't accept a valid return type.

methods! {
    Something,
    rtself,
    fn new_tmp() -> ::rutie::AnyObject {
        //          ^^ This is a :ty but not an :ident
        Fixnum::new(123).into()
    }
}
danielpclark commented 3 years ago

Thanks for this, I'll try and tackle an update this weekend.

danielpclark commented 2 years ago

This is now in master and released in v0.8.3