From 8b9753fc5301d2c8bb13dfbb2fb01bb63e9d01fe Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Fri, 16 Jan 2009 22:46:08 +0100 Subject: [PATCH] Deleting members while we do an .each on an array is not good --- pws | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pws b/pws index b58ea38..e73d036 100755 --- a/pws +++ b/pws @@ -326,7 +326,8 @@ class GroupConfig group['keys'] = [] unless group['keys'] still_contains_groups = false - group['members_to_do'].each do |member| + group['members_to_do'].clone.each do |member| + puts "member: #{member}" if is_group(member) if @groups[member]['members_to_do'].size == 0 group['keys'].concat @groups[member]['keys'] -- 2.39.5