Adjustments for recent Ruby versions