Remove warnings on ruby trunk

Same as https://github.com/rails/rails/commit/4d4ff531b8807ee88a3fc46875c7e76f613956fb