Skip to content

Commit

Permalink
Always issue deprecation warning when calling Regexp.new with 3rd pos…
Browse files Browse the repository at this point in the history
…itional 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>
  • Loading branch information
2 people authored and hsbt committed Dec 23, 2022
1 parent 0c2f335 commit 9b0a22c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/racc/statetransitiontable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def mkmapexp(arr)
end
i = ii
end
Regexp.compile(map, nil, 'n')
Regexp.compile(map, Regexp::NOENCODING)
end

def set_table(entries, dummy, tbl, chk, ptr)
Expand Down

0 comments on commit 9b0a22c

Please sign in to comment.