[macruby-changes] [1366] MacRuby/branches/experimental/string.c

source_changes at macosforge.org source_changes at macosforge.org
Sat Apr 4 18:39:46 PDT 2009


Revision: 1366
          http://trac.macosforge.org/projects/ruby/changeset/1366
Author:   lsansonetti at apple.com
Date:     2009-04-04 18:39:45 -0700 (Sat, 04 Apr 2009)
Log Message:
-----------
fixed -[Symbol isEqual:] to return false in case the argument is not a symbol

Modified Paths:
--------------
    MacRuby/branches/experimental/string.c

Modified: MacRuby/branches/experimental/string.c
===================================================================
--- MacRuby/branches/experimental/string.c	2009-04-05 01:30:20 UTC (rev 1365)
+++ MacRuby/branches/experimental/string.c	2009-04-05 01:39:45 UTC (rev 1366)
@@ -5193,13 +5193,10 @@
 static bool
 imp_rb_symbol_isEqual(void *rcv, SEL sel, void *other)
 {
-    if (other == NULL) {
-	return false;
-    }
     if (rcv == other) {
 	return true;
     }
-    if (!rb_objc_is_kind_of(other, (Class)rb_cNSString)) {
+    if (other == NULL || *(VALUE *)other != rb_cSymbol) {
 	return false;
     }
     return CFStringCompare((CFStringRef)rcv, (CFStringRef)other, 0) == 0;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20090404/98b96c93/attachment.html>


More information about the macruby-changes mailing list