Update scripts for Ruby 1.9 and recent changes