gandreas wrote:I'm not too sure about the NSNumber boolean conversion, since it relies on internal implementation details that aren't documented. Speaking hypothetically, I'd like to be able to use JSKit on the iPhone, and relying on implementation details of one implementation may not translate well to other implementations.
The output is: "Count true" when it should be "Count 1".
If other platforms don't support it, and we can't think of cleaner way to do it, then we should probably just conditionally compile it in on OS X.
At the very least, there is still a problem with code that uses kCFBooleanTrue/kCFBooleanFalse (which can happen especially with code that comes from various bridged core routines).
I don't believe NSNumbers are fully bridged with CFNumbers, so an NSNumber can't really be as CFBoolean, under the hood.