working with ruby 2.0.0

It's broken with recent ruby, so I've made this work with ruby 2.0.0 and 1.9.3. I've tested with my environment.