スタック

Ruby では Array に push, pop があるので、スタックとして Array を使う。