Fix #warnings taking exponential time to compute
Handle potential case where warnings returns nil
Use Timeout#timeout for warnings tests
Merge pull request #486 from Shopify/fix-exponential-warnings

Fix #warnings taking exponential time to compute