summaryrefslogtreecommitdiff
path: root/lib/racc
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2022-12-20 12:44:11 -0800
committerJeremy Evans <code@jeremyevans.net>2022-12-22 11:50:26 -0800
commit7e8fa06022a9e412e3f8e6c8b6f0ba1909f648d5 (patch)
treed677df86e4df121b3b005fa7d91c1a084e7734fc /lib/racc
parent9dcee2d80ee995e11b0fd437d4a94930ccb6db67 (diff)
downloadruby-7e8fa06022a9e412e3f8e6c8b6f0ba1909f648d5.tar.gz
Always issue deprecation warning when calling Regexp.new with 3rd positional argument
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>
Diffstat (limited to 'lib/racc')
-rw-r--r--lib/racc/statetransitiontable.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/racc/statetransitiontable.rb b/lib/racc/statetransitiontable.rb
index cae411c98b..d75fa1657a 100644
--- a/lib/racc/statetransitiontable.rb
+++ b/lib/racc/statetransitiontable.rb
@@ -216,7 +216,7 @@ module Racc
end
i = ii
end
- Regexp.compile(map, nil, 'n')
+ Regexp.compile(map, Regexp::NOENCODING)
end
def set_table(entries, dummy, tbl, chk, ptr)