add ruby solution for CS102 problem