Fix ActiveSupport::SafeBuffer#gsub bug again

#93 was previously fixed in #94, but was deleted in 8806c4ff, then put back in without the block argument in 4e14ce583. #93 needs to be fixed again.

I wish I knew how to write a test for this without introducing ActiveSupport as a dependency. I'll be happy to add it if you don't mind the development dependency.