Attemt to fix BlankSlate for Ruby 3.0 compatibility.

Resolves: rhbz#1923688
epel9
Vít Ondruch 4 years ago
parent 0911485682
commit a8df4b1c18

@ -0,0 +1,13 @@
diff --git a/lib/blankslate.rb b/lib/blankslate.rb
index 7ea1864..b974f40 100644
--- a/lib/blankslate.rb
+++ b/lib/blankslate.rb
@@ -129,7 +129,7 @@ class Module
alias blankslate_original_append_features append_features
def append_features(mod)
result = blankslate_original_append_features(mod)
- return result if mod != Object
+ return result if (mod != Object && mod != Kernel)
instance_methods.each do |name|
BlankSlate.hide(name)
end

@ -2,11 +2,14 @@
Name: rubygem-%{gem_name} Name: rubygem-%{gem_name}
Version: 3.2.4 Version: 3.2.4
Release: 3%{?dist} Release: 4%{?dist}
Summary: Builders for MarkUp Summary: Builders for MarkUp
License: MIT License: MIT
URL: http://onestepback.org URL: http://onestepback.org
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
# Attemt to fix BlankSlate for Ruby 3.0 compatibility.
# https://github.com/tenderlove/builder/issues/13
Patch0: rubygem-builder-3.2.4-Fix-Ruby-3-compatibility.patch
# Builder carries copy of Blankslate, which was in the meantime extracted into # Builder carries copy of Blankslate, which was in the meantime extracted into
# independent gem. # independent gem.
# https://github.com/jimweirich/builder/issues/24 # https://github.com/jimweirich/builder/issues/24
@ -39,6 +42,8 @@ Documentation for %{name}.
%prep %prep
%setup -q -n %{gem_name}-%{version} %setup -q -n %{gem_name}-%{version}
%patch0 -p1
%build %build
# Create the gem as gem install only works on a gem file # Create the gem as gem install only works on a gem file
gem build ../%{gem_name}-%{version}.gemspec gem build ../%{gem_name}-%{version}.gemspec
@ -85,6 +90,10 @@ popd
%{gem_instdir}/test %{gem_instdir}/test
%changelog %changelog
* Tue Mar 16 2021 Vít Ondruch <vondruch@redhat.com> - 3.2.4-4
- Attemt to fix BlankSlate for Ruby 3.0 compatibility.
Resolves: rhbz#1923688
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.4-3 * Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild

Loading…
Cancel
Save