We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e3ab21b commit 1ed232eCopy full SHA for 1ed232e
src/typed_data.rs
@@ -352,7 +352,9 @@ where
352
#[cfg(ruby_lt_4_1)]
353
reserved: [ptr::null_mut(); 1],
354
#[cfg(ruby_gte_4_1)]
355
- reserved: [ptr::null_mut(); 1],
+ // Ruby 4.1 expands rtypeddata's reserved slots; keep in sync with
356
+ // https://github.com/ruby/ruby/blob/master/include/ruby/internal/core/rtypeddata.h
357
+ reserved: [ptr::null_mut(); 7],
358
359
handle_weak_references: None,
360
},
tests/typed_data.rs
@@ -22,5 +22,5 @@ fn it_wraps_rust_struct() {
22
rb_assert!(ruby, "val.class == Example", val);
23
24
let ex: &Example = eval!(ruby, "val", val).unwrap();
25
- assert_eq!("foo", ex.value)
+ assert_eq!("foo", ex.value);
26
}
0 commit comments