fix method missing for ruby 2.0