This looks like a better use of regexp.

`if ! "#{img}-image" =~ current_images`