danielpclark / rutie

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

Prevent Segmentation Fault on ruby 3.2 when nil is passed #180

Open EmmN opened 1 year ago

bendangelo commented 7 months ago

Can this get merged in?

Zapotek commented 7 months ago

I still get a segfault when returning NilClass::new().to_any_object() to Ruby.

bendangelo commented 7 months ago

Ok I'm not totally sure who's working on this but I don't know rust so I can't help resolve. This fixes my use case.

EmmN commented 7 months ago

@bendangelo you can just install rutie from the fork

[dependencies]
rutie = { git = "https://github.com/MelianLabs/rutie-rb-sys.git", rev = "315ac571f8c8ec4c842df9bbfc85c07cbaccba0e" }
Zapotek commented 7 months ago

@EmmN Now I get:

error[E0425]: cannot find value `reserved_bytes` in this scope
   --> /home/zapotek/.cargo/git/checkouts/rutie-rb-sys-501648e53ffbabf9/315ac57/src/dsl.rs:700:35
    |
649 | macro_rules! wrappable_struct {
    | ----------------------------- in this expansion of `wrappable_struct!`
...
700 |                         reserved: reserved_bytes,
    |                                   ^^^^^^^^^^^^^^ not found in this scope
    |
   ::: src/uri.rs:733:1
    |
733 | wrappable_struct!( URI, URIWrapper, URI_WRAPPER );
    | ------------------------------------------------- in this macro invocation
Zapotek commented 7 months ago

When I don't specify a revision it compiles but I still get a segfault.

bendangelo commented 7 months ago

@bendangelo you can just install rutie from the fork

[dependencies]
rutie = { git = "https://github.com/MelianLabs/rutie-rb-sys.git", rev = "315ac571f8c8ec4c842df9bbfc85c07cbaccba0e" }

Thanks I've already done this.