compatible with ruby1.8