Fix a problem with ruby >= 1.9