ruby 2.0 fix

Getting the following error with ruby 2.0:
TypeError - no implicit conversion of Range into Integer