summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Kanis <lars@greiz-reinsdorf.de>2023-04-18 16:25:32 +0200
committerLars Kanis <lars@greiz-reinsdorf.de>2023-04-18 16:25:32 +0200
commit88fa99adc880b2ac82d0e963c065c7add65e2137 (patch)
tree9f890b1f0692d9054b03b72a9df6ede1ee481763
parentbc48722cee0d5dc9982aed633981b8a8b4885880 (diff)
downloadffi-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.rb6
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)