1 2def tak x, y, z 3 unless y < x 4 z 5 else 6 tak( tak(x-1, y, z), 7 tak(y-1, z, x), 8 tak(z-1, x, y)) 9 end 10end 11 12tak(18, 9, 0) 13 14