These two related PRs were opened within a couple hours of each other. The new optimizer_hints method offers a simple way to include optimizer hints in your queries. The new annotate method offers a simple way to annotate your queries with comments.
This PR elegantly ensures that ActiveSupport::SafeBuffer’s sub, sub!, gsub, and gsub! methods set back references. I learned a lot about Ruby by reading through this code and the review comments.
I always enjoy removing code that is no longer needed. It must be especially fun to remove code that includes the comment “I will explain the roflscale so that others will not rm this code.”
Has anybody else ever opened a production console session and fogotten to close it? ✋ Ever done it with the --sandbox flag and caused your database to run out of memory? 😭 Thanks, Rails, for protecting me against myself.