scala to ruby working