diff options
author | Lars Kanis <lars@greiz-reinsdorf.de> | 2023-04-18 16:25:32 +0200 |
---|---|---|
committer | Lars Kanis <lars@greiz-reinsdorf.de> | 2023-04-18 16:25:32 +0200 |
commit | 88fa99adc880b2ac82d0e963c065c7add65e2137 (patch) | |
tree | 9f890b1f0692d9054b03b72a9df6ede1ee481763 | |
parent | bc48722cee0d5dc9982aed633981b8a8b4885880 (diff) | |
download | ffi-88fa99adc880b2ac82d0e963c065c7add65e2137.tar.gz |
Skip struct specs on Ruby-3.0
It is incompatible to our usage of instance variables by the Struct class.
-rw-r--r-- | spec/ffi/struct_spec.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/ffi/struct_spec.rb b/spec/ffi/struct_spec.rb index 897e083..0429dd5 100644 --- a/spec/ffi/struct_spec.rb +++ b/spec/ffi/struct_spec.rb @@ -467,6 +467,8 @@ module StructSpecsStructTests end it "Can use CallbackInfo struct field in Ractor", :ractor do + skip "sharing structs accross Ractors requires Ruby-3.1" if RUBY_VERSION < "3.1" + res = Ractor.new do s = CallbackMember::TestStruct.new add_proc = lambda { |a, b| a + b } @@ -560,11 +562,13 @@ module StructSpecsStructTests end it "should be usable with Ractor", :ractor do + skip "Using structs in Ractor requires Ruby-3.1" if RUBY_VERSION < "3.1" + class TestStructRactor < FFI::Struct layout :i, :int end - res = Ractor.new(@conninfo) do |conninfo| + res = Ractor.new do s = TestStructRactor.new s[:i] = 0x14 LibTest.ptr_ret_int32_t(s, 0) |