Revision
4522
Author
lsansonetti@apple.com
Date
2010-09-17 14:19:08 -0700 (Fri, 17 Sep 2010)

Log Message

don't raise an exception when comparing an NSDictionary with a non-one

Modified Paths

Diff

Modified: MacRuby/trunk/NSDictionary.m (4521 => 4522)


--- MacRuby/trunk/NSDictionary.m	2010-09-17 08:31:11 UTC (rev 4521)
+++ MacRuby/trunk/NSDictionary.m	2010-09-17 21:19:08 UTC (rev 4522)
@@ -118,6 +118,9 @@
 static VALUE
 nshash_equal(id rcv, SEL sel, id other)
 {
+    if (![other isKindOfClass:(id)rb_cNSHash]) {
+	return Qfalse;
+    }
     return [rcv isEqualToDictionary:other] ? Qtrue : Qfalse;
 }