Ruby solution to g()('al') challenge