Modify the script to work on older versions of Ruby