From e880997492ab4d086f47da5eea444e4442fce086 Mon Sep 17 00:00:00 2001 From: Lars Kanis Date: Thu, 27 Apr 2023 12:51:01 +0200 Subject: 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. --- spec/ffi/spec_helper.rb | 2 +- spec/ffi/struct_spec.rb | 4 ---- 2 files changed, 1 insertion(+), 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 -- cgit v1.2.1