再帰をループにしたかったら
こういうのをいちいち作らなきゃだめだよ
class stack
 def initialize
  @crnt = 0
  @MAX_STACK = 32768
  @stk[MAX_STACK]
 end
def pop_stk()
  if -1 < crnt
   ret = stk[crnt]
   crnt = crnt - 1
   return ret
  end 
 end 
def push_stk(v)
  if crnt < MAX_STACK - 1
   crnt = crnt + 1
   stk[crnt] = v
  end
 end
end