Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve the way we detect Boolean values
Previously, we were relying on functionality found in CoreFoundation in order to determine if an NSNumber instance was representing an underlying Boolean value. This worked well, but unfortunately CoreFoundation isn't available on Linux, which means that Argo would never be able to compile. We'd like Argo to be as widely availably as possible, so we need to find another solution. Luckily, it looks like we can use `type(of:)` to determine this. That function ships with Swift itself and so _should_ mean that we're now able to compile on Linux without any behavioral change. I added another test to ensure that our decoding is operating as we'd expect. The previous test seemed like it was vulnerable to false positives.
- Loading branch information