38 lines
1.1 KiB
Diff
38 lines
1.1 KiB
Diff
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
|
|
|