How about:

unless ['302', '200', '201'].include? status_code

instead.