﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>AndyKernahan commented on Bug of the day...</title><description>&gt;&gt; That's nothing compared to my bug of the day:
  
&gt;&gt; try running this piece of code in the immediate window and then in the body of a funcion.
  
  
&gt;&gt; bool a = object.ReferenceEquals("A","A")
  
  
a would be true as the compiler would have inturned the string "A"
</description><link>http://ayende.com/3395/bug-of-the-day#comment8</link><guid>http://ayende.com/3395/bug-of-the-day#comment8</guid><pubDate>Thu, 03 Jul 2008 10:37:15 GMT</pubDate></item><item><title>arielr commented on Bug of the day...</title><description>That's nothing compared to my bug of the day:
  
try running this piece of code in the immediate window and then in the body of a funcion.
  
  
bool a = object.ReferenceEquals("A","A")
  
</description><link>http://ayende.com/3395/bug-of-the-day#comment7</link><guid>http://ayende.com/3395/bug-of-the-day#comment7</guid><pubDate>Wed, 02 Jul 2008 14:28:02 GMT</pubDate></item><item><title>Stefan Wenig commented on Bug of the day...</title><description>That's because GUIDs are so unique that even two identical GUIDs are not quite equal. Duh.
</description><link>http://ayende.com/3395/bug-of-the-day#comment6</link><guid>http://ayende.com/3395/bug-of-the-day#comment6</guid><pubDate>Wed, 02 Jul 2008 09:19:13 GMT</pubDate></item><item><title>James Curran commented on Bug of the day...</title><description>Maybe it been updated since the version I'm running (1.0.2700) but the real problem I see is that AreEqual(object, object) uses the object's Equals() methods (via ObjectsEqual) which is customized to the class, while AreNotEqual just uses  !(obj==obj) which ultimately just Object.ReferenceEquals.
</description><link>http://ayende.com/3395/bug-of-the-day#comment5</link><guid>http://ayende.com/3395/bug-of-the-day#comment5</guid><pubDate>Wed, 02 Jul 2008 00:46:02 GMT</pubDate></item><item><title>Andy Stopford commented on Bug of the day...</title><description>Thanks Oren, I'll need to investigate this more but I think in the absence of an assert for Guid that MbUnit is casting to object and then equating as a null. The AreNotEqual has this gem.
  
  
 if (expected == null ^ actual == null)
  
return;
  
  
As both become null in the cast it passes. Thats a complete guess at the moment until I can investigate more. Always fun.
  
  
Andy
  
  
  
  
  
  
</description><link>http://ayende.com/3395/bug-of-the-day#comment4</link><guid>http://ayende.com/3395/bug-of-the-day#comment4</guid><pubDate>Tue, 01 Jul 2008 22:02:47 GMT</pubDate></item><item><title>Andrey Shchekin commented on Bug of the day...</title><description>It's funny that I have stumbled in the exactly same bug today.
  
Well, seems almost no one is actually using AreNotEqual if this lived to the 2.4.
</description><link>http://ayende.com/3395/bug-of-the-day#comment3</link><guid>http://ayende.com/3395/bug-of-the-day#comment3</guid><pubDate>Tue, 01 Jul 2008 22:01:49 GMT</pubDate></item><item><title>Oran commented on Bug of the day...</title><description>Yep, ran into that one a while ago...
  
http://code.google.com/p/mb-unit/issues/detail?id=114
</description><link>http://ayende.com/3395/bug-of-the-day#comment2</link><guid>http://ayende.com/3395/bug-of-the-day#comment2</guid><pubDate>Tue, 01 Jul 2008 22:00:14 GMT</pubDate></item><item><title>josh commented on Bug of the day...</title><description>well that's helpful
</description><link>http://ayende.com/3395/bug-of-the-day#comment1</link><guid>http://ayende.com/3395/bug-of-the-day#comment1</guid><pubDate>Tue, 01 Jul 2008 21:02:53 GMT</pubDate></item></channel></rss>