update resource_permute for ruby 1.9