remove unintended private call

(cherry picked from commit ce4ee13976ee98f047f732597d148db50106688c)
This commit is contained in:
baizg1107 2022-03-01 18:27:16 +08:00 committed by openeuler-sync-bot
parent 98be899884
commit 945a233b50
2 changed files with 32 additions and 1 deletions

View File

@ -0,0 +1,26 @@
From 320b6fc7ed593311340313a1ed15ce07b7f5217f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@riseup.net>
Date: Sun, 12 Jan 2020 13:41:59 +0100
Subject: [PATCH] Remove unintended `private` call
From reading https://bugs.ruby-lang.org/issues/13249, I don't think
`private` is having any effect here, since it's only supposed to affect
further methods defined inside the current class method (if at all), and
this method does not define any method inside itself.
---
lib/cucumber/core/test/result.rb | 1 -
1 file changed, 1 deletion(-)
diff --git a/lib/cucumber/core/test/result.rb b/lib/cucumber/core/test/result.rb
index 136002a..21d06c8 100644
--- a/lib/cucumber/core/test/result.rb
+++ b/lib/cucumber/core/test/result.rb
@@ -9,7 +9,6 @@ module Result
STRICT_AFFECTED_TYPES = [:flaky, :undefined, :pending].freeze
def self.ok?(type, be_strict = StrictConfiguration.new)
- private
class_name = type.to_s.slice(0, 1).capitalize + type.to_s.slice(1..-1)
const_get(class_name).ok?(be_strict.strict?(type))
end

View File

@ -1,12 +1,13 @@
%global gem_name cucumber-core %global gem_name cucumber-core
Name: rubygem-%{gem_name} Name: rubygem-%{gem_name}
Version: 3.2.0 Version: 3.2.0
Release: 2 Release: 3
Summary: Core library for the Cucumber BDD app Summary: Core library for the Cucumber BDD app
License: MIT License: MIT
URL: https://cucumber.io URL: https://cucumber.io
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
Source1: https://github.com/cucumber/cucumber-ruby-core/archive/v%{version}.tar.gz Source1: https://github.com/cucumber/cucumber-ruby-core/archive/v%{version}.tar.gz
Patch0: 0001-remove-unintended-private-call.patch
BuildRequires: ruby(release) rubygems-devel ruby rubygem(gherkin) rubygem(rspec) BuildRequires: ruby(release) rubygems-devel ruby rubygem(gherkin) rubygem(rspec)
BuildRequires: rubygem(kramdown) rubygem(cucumber-tag_expressions) rubygem(backports) BuildRequires: rubygem(kramdown) rubygem(cucumber-tag_expressions) rubygem(backports)
BuildRequires: rubygem(kramdown-parser-gfm) BuildRequires: rubygem(kramdown-parser-gfm)
@ -23,6 +24,7 @@ Documentation for %{name}.
%prep %prep
%setup -q -n %{gem_name}-%{version} -b 1 %setup -q -n %{gem_name}-%{version} -b 1
%patch0 -p1
%gemspec_remove_dep -s ../%{gem_name}-%{version}.gemspec -g gherkin '>= 5.0.0' %gemspec_remove_dep -s ../%{gem_name}-%{version}.gemspec -g gherkin '>= 5.0.0'
%gemspec_add_dep -s ../%{gem_name}-%{version}.gemspec -g gherkin '>= 4.1.0' %gemspec_add_dep -s ../%{gem_name}-%{version}.gemspec -g gherkin '>= 4.1.0'
@ -60,6 +62,9 @@ popd
%doc %{gem_instdir}/CHANGELOG.md %doc %{gem_instdir}/CHANGELOG.md
%changelog %changelog
* Tue Mar 1 2022 baizhonggui <baizhonggui@huawei.com> -3.2.0-3
- Remove unintended private call for fixing build error
* Tue Dec 15 2020 chengzihan <chengzihan2@huawei.com> -3.2.0-2 * Tue Dec 15 2020 chengzihan <chengzihan2@huawei.com> -3.2.0-2
- add BuildRequires: rubygem(kramdown-parser-gfm) fix compiling problem - add BuildRequires: rubygem(kramdown-parser-gfm) fix compiling problem