From eb737916b1e435ff8212913c03e5798089b0d3fe Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sat, 11 Jan 2020 10:19:29 +0900 Subject: Warn when :newline precedes other newline options --- test/ruby/test_econv.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/ruby/test_econv.rb b/test/ruby/test_econv.rb index caa0fca8b7..5a4af9b6a3 100644 --- a/test/ruby/test_econv.rb +++ b/test/ruby/test_econv.rb @@ -922,7 +922,9 @@ class TestEncodingConverter < Test::Unit::TestCase end newlines.each do |nl| opts = {newline: :universal, nl => true} - ec2 = Encoding::Converter.new("", "", **opts) + ec2 = assert_warning(/:newline option preceds/, opts.inspect) do + Encoding::Converter.new("", "", **opts) + end assert_equal(ec1, ec2) end end -- cgit v1.2.3