Fix unknown regexp option
(cherry picked from commit ba857814bdb75e529852b781409de0f37d7981bb)
This commit is contained in:
parent
7b63938a4e
commit
09d0eb6c3b
37
Fix-unknown-regexp-option.patch
Normal file
37
Fix-unknown-regexp-option.patch
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
From db26661fb5f83546906ac7e1460f0395116a306d Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jeremy Evans <code@jeremyevans.net>
|
||||||
|
Date: Tue, 20 Dec 2022 12:44:11 -0800
|
||||||
|
Subject: [PATCH] Always issue deprecation warning when calling Regexp.new with
|
||||||
|
3rd positional argument
|
||||||
|
Reference: https://github.com/ruby/racc/commit/9b0a22c999c3c55ec2aca585468d456d1eca2378
|
||||||
|
|
||||||
|
Previously, only certain values of the 3rd argument triggered a
|
||||||
|
deprecation warning.
|
||||||
|
|
||||||
|
First step for fix for bug #18797. Support for the 3rd argument
|
||||||
|
will be removed after the release of Ruby 3.2.
|
||||||
|
|
||||||
|
Fix minor fallout discovered by the tests.
|
||||||
|
|
||||||
|
Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
---
|
||||||
|
lib/racc/statetransitiontable.rb | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb
|
||||||
|
index 4d54287..d75fa16 100644
|
||||||
|
--- a/lib/racc/statetransitiontable.rb
|
||||||
|
+++ b/lib/racc/statetransitiontable.rb
|
||||||
|
@@ -216,7 +216,7 @@ module Racc
|
||||||
|
end
|
||||||
|
i = ii
|
||||||
|
end
|
||||||
|
- Regexp.compile(map, 'n')
|
||||||
|
+ Regexp.compile(map, Regexp::NOENCODING)
|
||||||
|
end
|
||||||
|
|
||||||
|
def set_table(entries, dummy, tbl, chk, ptr)
|
||||||
|
--
|
||||||
|
2.27.0
|
||||||
|
|
||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: rubygem-%{gem_name}
|
Name: rubygem-%{gem_name}
|
||||||
Version: 1.6.0
|
Version: 1.6.0
|
||||||
Release: 1
|
Release: 2
|
||||||
|
|
||||||
Summary: LALR(1) parser generator
|
Summary: LALR(1) parser generator
|
||||||
License: BSD
|
License: BSD
|
||||||
@ -12,6 +12,7 @@ Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|||||||
Source10: rubygem-%{gem_name}-%{version}-missing-files.tar.gz
|
Source10: rubygem-%{gem_name}-%{version}-missing-files.tar.gz
|
||||||
# Source10 is created by %%{SOURCE11} %%version
|
# Source10 is created by %%{SOURCE11} %%version
|
||||||
Source11: racc-create-tarball-missing-files.sh
|
Source11: racc-create-tarball-missing-files.sh
|
||||||
|
Patch0: Fix-unknown-regexp-option.patch
|
||||||
|
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: rubygems-devel
|
BuildRequires: rubygems-devel
|
||||||
@ -35,6 +36,7 @@ Documentation for %{name}.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{gem_name}-%{version} -a 10
|
%setup -q -n %{gem_name}-%{version} -a 10
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
mv ../%{gem_name}-%{version}.gemspec .
|
mv ../%{gem_name}-%{version}.gemspec .
|
||||||
|
|
||||||
@ -124,5 +126,8 @@ popd
|
|||||||
%doc %{gem_instdir}/sample
|
%doc %{gem_instdir}/sample
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Aug 10 2023 wulei <wu_lei@hoperun.com> - 1.6.0-2
|
||||||
|
- Fix unknown regexp option
|
||||||
|
|
||||||
* Thu Mar 3 2022 caodongxia<caodongxia@huawei.com> - 1.6.0-1
|
* Thu Mar 3 2022 caodongxia<caodongxia@huawei.com> - 1.6.0-1
|
||||||
- Initial package
|
- Initial package
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user