iterate over an array and delete elements conditionally
note : your break is useless, because if the block returns a falsey value, the url is kept.

Maybe it can just be a bit more expressive ?

def timeouts?( url )
  perform_request( url ) &amp;&amp; false 
rescue TimeoutError
  true
end

@urls.delete_if {|url| timeouts?( url ) }


You could even make timeouts? a method on your @urls objects, for extra readability : 

@urls.delete_if( &amp;:timeouts? )


if you want to keep @tokland's functionnal approach, just use :

@kept_urls = @urls.reject{|url| timeouts?( url ) }


however, it would not be fully "functionnal", because timeouts may not return the same results with the same arguments, depending on the execution environment.