mail
mail copied to clipboard
Add Mail.require_silently for parser warnings
Summary
Previously, requiring parsers emitted a number of unused variable and unreachable statement warnings. The unused variable warnings are simple to fix (see skipkayhil/mail@8dd1655dc4628e34d9d654a1526bac7cd9513252), but the unreachable statements do not seem to be.
Since it seems like its difficult to make Ragel generated parsers not emit any warnings, this commit adds a helper method that wraps require and silences the warnings emitted. The changes to $VERBOSE in the parsers added in 7ef5694b77bbe86be851dbcfae38b7b47c689555 unfortunately do not help as the warnings are emitted on parse and not when evaluating the files.
Additional Information
Ref: #1551
If the method is overkill but the approach is reasonable, I can also change this to just add the warning silencing to the individual requires since there are only 16.