Add #42 Ruby solution