Permalink
Browse files

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

git-svn-id: http://svn.macosforge.org/repository/ruby/MacRuby/trunk@4522 23306eb0-4c56-4727-a40e-e92c0eb68959
  • Loading branch information...
lrz committed Sep 17, 2010
1 parent 47cbb12 commit 72b8cbff174cc9f84d64441693826dba864da4d6
Showing with 3 additions and 0 deletions.
  1. +3 −0 NSDictionary.m
View
@@ -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;
}

0 comments on commit 72b8cbf

Please sign in to comment.