diff options
author | Lars Kanis <lars@greiz-reinsdorf.de> | 2023-04-27 12:51:01 +0200 |
---|---|---|
committer | Lars Kanis <lars@greiz-reinsdorf.de> | 2023-04-27 13:47:57 +0200 |
commit | e880997492ab4d086f47da5eea444e4442fce086 (patch) | |
tree | d87d4d8c229c31206761967bee12227c66882ad5 | |
parent | 0093113f07d1878d6f70480cdc1bf95c09fb7c2a (diff) | |
download | ffi-e880997492ab4d086f47da5eea444e4442fce086.tar.gz |
Do not run any Ractor specs on ruby-3.0
Shareable instance variables on modules are essential for most Ractor specs.
They were introduced in ruby-3.1.
-rw-r--r-- | spec/ffi/spec_helper.rb | 2 | ||||
-rw-r--r-- | spec/ffi/struct_spec.rb | 4 |
2 files changed, 1 insertions, 5 deletions
diff --git a/spec/ffi/spec_helper.rb b/spec/ffi/spec_helper.rb index 63f8b78..3d8a025 100644 --- a/spec/ffi/spec_helper.rb +++ b/spec/ffi/spec_helper.rb @@ -9,7 +9,7 @@ require 'objspace' RSpec.configure do |c| c.filter_run_excluding :broken => true - c.filter_run_excluding( :ractor ) unless defined?(Ractor) + c.filter_run_excluding( :ractor ) unless defined?(Ractor) && RUBY_VERSION >= "3.1" end module TestLibrary diff --git a/spec/ffi/struct_spec.rb b/spec/ffi/struct_spec.rb index 0429dd5..d09b7b6 100644 --- a/spec/ffi/struct_spec.rb +++ b/spec/ffi/struct_spec.rb @@ -467,8 +467,6 @@ 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 } @@ -562,8 +560,6 @@ 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 |