From 1f23e6e7f0ab4a6efab598c1ee528bb52d40ee51 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Tue, 20 Dec 2022 12:44:11 -0800 Subject: 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 --- test/psych/test_yaml.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/psych/test_yaml.rb b/test/psych/test_yaml.rb index e12b976..32dd43b 100644 --- a/test/psych/test_yaml.rb +++ b/test/psych/test_yaml.rb @@ -34,7 +34,7 @@ class Psych_Unit_Tests < Psych::TestCase # [ruby-core:34969] def test_regexp_with_n - assert_cycle(Regexp.new('',0,'n')) + assert_cycle(Regexp.new('',Regexp::NOENCODING)) end # # Tests modified from 00basic.t in Psych.pm -- cgit v1.2.1