Filtering project root on backtrace can break filename consistency if project root looks like a part of filename.
I've run into this on Heroku cedar stack where my app root is /app. So backtrace filtering makes [PROJECT_ROOT][PROJECT_ROOT]/model/user.rb from /app/app/model/user.rb which is wrong.
Substituting only the first occurrence of project root solves the problem.
Fix for filtering project root in backtrace on Heroku and alike virtu…
Nice, looks good. I've started to use the Cedar stack, too, so this should come in handy.