Calling integerValue and unsignedIntegerValue on NSDecimalNumbers created from strings (including those using KVC) yields inconsistent results.
This bit someone trying to use key-value coding to get the average of a given number out of an array of items with an NSUInteger property.
The NSNumber which came out of the @avg.value KVC method was of value 588.33333333333333333333333333333333333. The person then tried to access this value by calling both average.integerValue and average.unsignedIntegerValue.
On this person's computer, which was running Mavericks, the average integer would be 588. On my computer, running Yosemite, the average would be zero. After quite a bit of futzing about, we discovered that NSDecimalNumbers created from a string respond differently to being converted to an integer depending on the length.
http://openradar.appspot.com/20211159








