rubygem-rspec-support/rubygem-rspec-support-3.12.0-pend-lock-fiber-test.patch

29 lines
1.1 KiB
Diff

From 02e44fa481d5061c95d5332a91bcf7143b582bc8 Mon Sep 17 00:00:00 2001
From: Jon Rowe <hello@jonrowe.co.uk>
Date: Sat, 10 Dec 2022 11:25:15 +1100
Subject: [PATCH] Pend broken spec on Ruby 3.1.3, skip on CI for Ruby head
---
spec/rspec/support/reentrant_mutex_spec.rb | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/spec/rspec/support/reentrant_mutex_spec.rb b/spec/rspec/support/reentrant_mutex_spec.rb
index 9bef54ee..c8a41c1e 100644
--- a/spec/rspec/support/reentrant_mutex_spec.rb
+++ b/spec/rspec/support/reentrant_mutex_spec.rb
@@ -28,7 +28,13 @@
order.join_all
end
- if RUBY_VERSION >= '3.0'
+ # On Ruby 3.1.3 and RUBY_HEAD the raise in this spec can
+ # bypass the `raise_error` capture and break this spec but
+ # it is not sufficient to pend it as the raise can escape to the other
+ # threads somehow therefore poisoning them so its skipped entirely.
+ # This is a temporary work around to allow green cross project builds but
+ # needs a fix.
+ if RUBY_VERSION >= '3.0' && RUBY_VERSION < '3.1.3'
it 'waits when trying to lock from another Fiber' do
mutex.synchronize do
ready = false