josevalim/rails-footnotes — pull request #93 by tommireinikainen (2013-05-23 11:00:45+00:00)
Title: Usage of Hash#diff prints a million deprecation warnings to server log

Footnotes::Extensions::Routes::filtered_routes uses Hash#diff which has been deprecated by Rails 4 (or earlier?), see https://github.com/rails/rails/pull/8158. This cause the server to print a bazillion deprecation warnings to the server log on every refresh:

DEPRECATION WARNING: Hash#diff is no longer used inside of Rails, and is being deprecated with no replacement. If you're using it to compare hashes for the purpose of testing, please use MiniTest's assert_equal instead. (called from require at bin/rails:4)
DEPRECATION WARNING: Hash#diff is no longer used inside of Rails, and is being deprecated with no replacement. If you're using it to compare hashes for the purpose of testing, please use MiniTest's assert_equal instead. (called from require at bin/rails:4)
DEPRECATION WARNING: Hash#diff is no longer used inside of Rails, and is being deprecated with no replacement. If you're using it to compare hashes for the purpose of testing, please use MiniTest's assert_equal instead. (called from require at bin/rails:4)
...

I just extracted the original diff into a local function without touching the logic in filtered_routes.