add ruby solution to q012