only convert Gem::List to an array when we have to

the Gem::List can get long.  There is no reason to convert it to an
array when nobody is going to see the output, so let's stop doing that.