From: MR Damien Date: 2008-12-09T22:53:26+09:00 Subject: problem with array ... object inside disappear Hi dudes, I am becoming crazy with an array behaviour. Here is the stuff. I have an objet PackageList that keep an internal list of packages inside an array. class PackageList def initialize @list = Array.new end def refresh p @list # show list first time @list.each do |item| p item.name # show list second time end end end The problem here is that when I show the list for the first time I didn't get the same result than the second time depiste I didn't change anything in my list. extract from first time [#, #, #, ...] extract from second time "test1" "test3" ... The "test2" object disappeared depiste I didn't change anything. Now if I call the method for 'each' latter in the software, the "test2" object appears again. I can't find why the list is changing even if I didn't touch anything. -- Posted via http://www.ruby-forum.com/.