Yeah, well to be honest I have no idea what this code does. I've found this commit by @josevalim which introduced it: https://github.com/strzalek/rails/commit/4f044528c0373b0a581a12b1311a7a544ded6c58

For me, it also looks like it could've be removed.