From a29d5fbe8d66d83705e3879a9f9c71bf65328335 Mon Sep 17 00:00:00 2001 From: Jeremy Evans Date: Tue, 17 Dec 2024 22:31:18 -0800 Subject: [PATCH] Update warning filters Remove the lib/commonmarker and lib/pdf/reader/font.rb filters. They do not appear to be necessary anymore. Note that the creole filter can be removed when creole support is removed. Add new warning filters for radius and temple (used by slim). Both the radius and slim tests have spurious warnings on Ruby 3.4 due to chilled strings. I would guess temple will fix the issue since it is still maintained, but it seems less likely for radius. These warnings are definitely spurious, as the tests pass when you use --disable-frozen-string-literal and also when you use --enable-frozen-string-literal. --- test/test_helper.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/test_helper.rb b/test/test_helper.rb index 3b062d8..13b6336 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -13,7 +13,14 @@ require 'warning' rescue LoadError else - Warning.ignore(%r{lib/pdf/reader/font.rb|lib/creole/parser.rb|lib/commonmarker}) + Warning.ignore(%r{lib/creole/parser.rb}) # Remove when creole support is removed + + # Ignore spurious frozen string literal errors. Both of these check + # that the string is frozen, and duplicate it. This results in a + # spurious warning on Ruby 3.4, which defaults to chilled strings + # You need to use String#+@ to avoid this warning. However, they + # will work when Ruby does decide to actually freeze literal strings. + Warning.ignore(%r{lib/radius/utility|lib/temple/filters/encoding}) end end