Skip to content

Commit 1f23e6e

Browse files
jeremyevansnobu
authored andcommitted
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 <[email protected]>
1 parent bdf20e6 commit 1f23e6e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/psych/test_yaml.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def test_multiline_regexp
3434

3535
# [ruby-core:34969]
3636
def test_regexp_with_n
37-
assert_cycle(Regexp.new('',0,'n'))
37+
assert_cycle(Regexp.new('',Regexp::NOENCODING))
3838
end
3939
#
4040
# Tests modified from 00basic.t in Psych.pm

0 commit comments

Comments
 (0)