Iterator is not including values added to it inside the loop : I am using `ids.each do |id|` which will loop through the id and look for child ids to add to the `ids` array. 

At the start, ids contains 1 value, but during the first iteration it gets a second value. However, the iterator only runs once. the second value is never accessed

Here's my code:

    ids = [1]
    ids.each do |id|
      # Do some things
      ids |= search_for_more_ids(id)
      # ids is now [1,2] but the loop still exists on the first iteration
    end


It's weird because this used to work. 

Any help would be appreciated