convert string to nmber in Ruby