Ruby solutions to the python challenge