From 56f9c20701aa07eb0578c48df4a8845805f4f80a Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Wed, 21 Dec 2022 15:11:59 +0900 Subject: [PATCH] Backport upstream fix for test failure with ruby3.2 wrt class_serial removal --- ...4-ruby32-rubyvm-class_serial-removal.patch | 23 +++++++++++++++++++ rubygem-activesupport.spec | 9 +++++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 rubygem-activesupport-7.0.4-ruby32-rubyvm-class_serial-removal.patch diff --git a/rubygem-activesupport-7.0.4-ruby32-rubyvm-class_serial-removal.patch b/rubygem-activesupport-7.0.4-ruby32-rubyvm-class_serial-removal.patch new file mode 100644 index 0000000..2f4cb1a --- /dev/null +++ b/rubygem-activesupport-7.0.4-ruby32-rubyvm-class_serial-removal.patch @@ -0,0 +1,23 @@ +From 60ffaac2e9644076e53afa1a2b1a716e289b7085 Mon Sep 17 00:00:00 2001 +From: Akira Matsuda +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 diff --git a/rubygem-activesupport.spec b/rubygem-activesupport.spec index 81aeca6..4f5c6c2 100644 --- a/rubygem-activesupport.spec +++ b/rubygem-activesupport.spec @@ -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 - 1:7.0.4-2 +- Backport upstream fix for test failure with ruby3.2 wrt class_serial removal + * Thu Sep 15 2022 Pavel Valena - 1:7.0.4-1 - Update to activesupport 7.0.4.