Robert Klemme
10/5/2008 4:25:00 PM
On 04.10.2008 12:26, jackster the jackle wrote:
> David A. Black wrote:
>> Hi --
>>
>> Check out Array#partition too. What you've got there looks like it
>> could be:
>>
>> @acl_all_array, @acl_range = @acl_all_array.partition do |range|
>> range[/access-list/]
>> end
>>
>> or something like that.
And, to give you another option you can fill the second array inside the
delete_if block as well:
@acl_all_array.delete_if { |x| x[/access-list/] and
@acl_range.push(x)}
Cheers
robert