title: NSNumber comparision iOS SDK 4.2 vs 5, in Objective-C?
body: <p>I found a bug in my app: The logic was that I was comparing two <code>NSNumbers</code> using "==", and I believe it used to work. But it no longer passes on iOS sdk 5, so I need to use <code>isEqualToNumber</code> instead.</p>
  
  <p>Can anyone with iOS sdk 4.2 please try and run the following code and give me the result. I tried to revert to older Xcode to test it myself, but I was not able to do that.</p>
  
  <pre><code>NSNumber *num1 = [NSNumber numberWithInt:100];
  NSNumber *num2 = [NSNumber numberWithInt:100];
  
  if (num1 == num2)
  {
      NSLog(@"== YES");
  }
  else
  {
      NSLog(@"== NO");
  }
  </code></pre>