fix ruby scripts for ruby-1.9