commit:     1b969022f467a0496e1074f1ba3b61c8e589afd2
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  2 01:44:23 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr  2 01:50:29 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1b969022

dev-ruby/activesupport: enable ruby32 for 7.0.4.3

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../activesupport/activesupport-7.0.4.3.ebuild     |  6 +++++-
 .../files/activesupport-7.0.4.3-ruby32.patch       | 23 ++++++++++++++++++++++
 2 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/dev-ruby/activesupport/activesupport-7.0.4.3.ebuild 
b/dev-ruby/activesupport/activesupport-7.0.4.3.ebuild
index f0801876283b..b8a341ae5558 100644
--- a/dev-ruby/activesupport/activesupport-7.0.4.3.ebuild
+++ b/dev-ruby/activesupport/activesupport-7.0.4.3.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-USE_RUBY="ruby27 ruby30 ruby31"
+USE_RUBY="ruby27 ruby30 ruby31 ruby32"
 
 RUBY_FAKEGEM_EXTRADOC="CHANGELOG.md README.rdoc"
 
@@ -45,6 +45,10 @@ ruby_add_bdepend "test? (
        <dev-ruby/minitest-5.16:5
        )"
 
+PATCHES=(
+       "${FILESDIR}"/${PN}-7.0.4.3-ruby32.patch
+)
+
 all_ruby_prepare() {
        # Set the secure permissions that tests expect.
        chmod 0755 "${HOME}" || die "Failed to fix permissions on home"

diff --git a/dev-ruby/activesupport/files/activesupport-7.0.4.3-ruby32.patch 
b/dev-ruby/activesupport/files/activesupport-7.0.4.3-ruby32.patch
new file mode 100644
index 000000000000..82fc7a335e86
--- /dev/null
+++ b/dev-ruby/activesupport/files/activesupport-7.0.4.3-ruby32.patch
@@ -0,0 +1,23 @@
+Per https://github.com/rails/rails/pull/46735#issuecomment-1352643705, this
+is just dropping a test which doesn't make sense for ruby32.
+
+https://github.com/rails/rails/issues/46712
+https://github.com/rails/rails/pull/46735
+
+From 60ffaac2e9644076e53afa1a2b1a716e289b7085 Mon Sep 17 00:00:00 2001
+From: Akira Matsuda <[email protected]>
+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
+--- a/test/executor_test.rb
++++ b/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

Reply via email to