They won't do that any more except by accident. All refunds are in the same form of payment as the purchase. You only get a cash refund if you originally paid cash. Gift card refunds are given as a new gift card.
Pretty much all retailers are operating this way to discourage fraud (or churning cards for miles

).