Instead of determining whether `args` is an array here, you may want to test above whether (e.g.) `args.first.is_a?(Array)`.