Skip to content

Commit

Permalink
Update warning filters
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jeremyevans committed Dec 18, 2024
1 parent 18b58ff commit a29d5fb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a29d5fb

Please sign in to comment.