I don't think our backtrace filtering logic could be applied to warnings filtering. Backtraces have a standard form that _always_ includes the file name and is therefore easy to filter by file name or gem source.
Warnings, on the other hand, have no standard form and do not always include file names.
Another thing to bear in mind is that RSpec's `--warnings` flag is only intended to enable Ruby's warning mode -- which is an entirely different thing from warnings emitted by ruby code calling `$stderr.warn` but which is surfaced to the user in the same way (via $stderr). It's not totally clear to me what kind of warnings you're intending to solve, Patrick.
Personally, I wish Ruby itself provided APIs to control warnings more tightly so that you could enable it for only particular files or directories. Such an API could then trivially used in RSpec for this purpose and could be useful outside of RSpec, too. Patrick, would you want to work with the Ruby core team to see if they're interested in that kind of improvement?
If you want to proceed with working off of what Ruby currently provides, I recommend building it as an RSpec extension gem. Once it has proved useful, robust and stable in multiple projects we can consider rolling it into RSpec in a future version.
Myron