[macruby-changes] [4522] MacRuby/trunk/NSDictionary.m
source_changes at macosforge.org
source_changes at macosforge.org
Fri Sep 17 14:19:11 PDT 2010
Revision: 4522
http://trac.macosforge.org/projects/ruby/changeset/4522
Author: lsansonetti at 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:
--------------
MacRuby/trunk/NSDictionary.m
Modified: MacRuby/trunk/NSDictionary.m
===================================================================
--- 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;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100917/277d8006/attachment.html>
More information about the macruby-changes
mailing list