From: Simon Strandgaard <0bz63fz3m1qt3001@...> Date: 2003-06-24T08:41:32+09:00 Subject: Array#pop doesn't remove last element? I have an absurd problem in my ruby-code. I tried recreating the same problem in a small piece of code, but impossible! Therefore I have to show you that buggy part in my application-code. /edit.rb:417:in `get_state': vspace has not been removed correct! (RuntimeError) right.empty? true current.class LineObjects::VSpace left.size 12 objs.size 11 from ./edit.rb:408:in `each' from ./edit.rb:408:in `get_state' from ./buffer.rb:312:in `get_state' from ./history.rb:12:in `get_memento' from ./control.rb:8:in `get_memento' from ./history.rb:31:in `execute' from ./control.rb:189:in `dispatch' from ./main.rb:24:in `run' from ./main.rb:22:in `loop' from ./main.rb:25:in `run' from ./main.rb:35:in `launch' from ./aeditor:3 I don't understand why this exception occur... can someone enligthen me ? # purpose: # take a snapshot of current state, maybe restore it later # used by memento def get_state objs = @left objs << @current if @current objs += @right if objs.last.kind_of?(LineObjects::VSpace) objs.pop end objs.each do |obj| if obj.kind_of?(LineObjects::VSpace) msg =<