add ruby solution to q039