Backport upstream fix for test failure with ruby3.2 wrt class_serial removal

f38
Mamoru TASAKA 2 years ago
parent 629d6458bf
commit 56f9c20701

@ -0,0 +1,23 @@
From 60ffaac2e9644076e53afa1a2b1a716e289b7085 Mon Sep 17 00:00:00 2001
From: Akira Matsuda <ronnie@dio.jp>
Date: Thu, 15 Dec 2022 15:45:27 +0900
Subject: [PATCH] RubyVM class serial is no longer available in Ruby 3.2
since ruby/ruby@13bd617ea6fdf72467c593639cf33312a06c330c
---
activesupport/test/executor_test.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/activesupport/test/executor_test.rb b/activesupport/test/executor_test.rb
index d366ae55b6e0..27872458d95b 100644
--- a/activesupport/test/executor_test.rb
+++ b/activesupport/test/executor_test.rb
@@ -226,7 +226,7 @@ def test_hook_insertion_order
end
def test_class_serial_is_unaffected
- skip if !defined?(RubyVM)
+ skip if !defined?(RubyVM) || !RubyVM.stat.has_key?(:class_serial)
hook = Class.new do
define_method(:run) do

@ -5,7 +5,7 @@
Name: rubygem-%{gem_name}
Epoch: 1
Version: 7.0.4
Release: 1%{?dist}
Release: 2%{?dist}
Summary: A support libraries and Ruby core extensions extracted from the Rails framework
License: MIT
URL: http://rubyonrails.org
@ -26,6 +26,9 @@ Patch1: rubygem-activesupport-7.0.2.3-Remove-the-multi-call-form-of-assert_calle
Patch2: rubygem-activesupport-7.0.2.3-Remove-the-multi-call-form-of-assert_called_with-test.patch
# https://github.com/rails/rails/pull/45370
Patch3: rubygem-activesupport-7.0.2.3-Fix-tests-for-minitest-5.16.patch
# https://github.com/rails/rails/pull/46735
# Fix for test failure with ruby3.2 wrt class_serial removal
Patch4: rubygem-activesupport-7.0.4-ruby32-rubyvm-class_serial-removal.patch
# ruby package has just soft dependency on rubygem({bigdecimal,json}), while
# ActiveSupport always requires them.
@ -73,6 +76,7 @@ Documentation for %{name}.
pushd %{_builddir}
%patch2 -p2
%patch4 -p2
popd
%build
@ -132,6 +136,9 @@ popd
%doc %{gem_instdir}/README.rdoc
%changelog
* Wed Dec 21 2022 Mamoru TASAKA <mtasaka@fedoraproject.org> - 1:7.0.4-2
- Backport upstream fix for test failure with ruby3.2 wrt class_serial removal
* Thu Sep 15 2022 Pavel Valena <pvalena@redhat.com> - 1:7.0.4-1
- Update to activesupport 7.0.4.

Loading…
Cancel
Save