deal with ruby 1.8 or 1.9