Added in fix for those still on Ruby 1.8. I now detect the version of Ruby and use the appropriate method on the line.