[macruby-changes] [3079] MacRuby/trunk/vm.cpp

source_changes at macosforge.org source_changes at macosforge.org
Sun Dec 6 17:49:49 PST 2009


Revision: 3079
          http://trac.macosforge.org/projects/ruby/changeset/3079
Author:   neeracher at apple.com
Date:     2009-12-06 17:49:48 -0800 (Sun, 06 Dec 2009)
Log Message:
-----------
Don't omit test for :

Modified Paths:
--------------
    MacRuby/trunk/vm.cpp

Modified: MacRuby/trunk/vm.cpp
===================================================================
--- MacRuby/trunk/vm.cpp	2009-12-07 01:47:17 UTC (rev 3078)
+++ MacRuby/trunk/vm.cpp	2009-12-07 01:49:48 UTC (rev 3079)
@@ -1646,6 +1646,10 @@
     memcpy(token, &selname[token_beg], token_len);
     token[token_len] = '\0';
 
+    if (strchr(token, ':') != NULL) {
+	return false;
+    }
+
 #if 1
     // token must start with a capital character.
     return isupper(token[0]);
@@ -1654,11 +1658,9 @@
     if (!isupper(token[0])) {
 	return false;
     }
+
     // Decapitalize the token and look if it's a valid KVO attribute.
     token[0] = tolower(token[0]);
-    if (strchr(token, ':') != NULL) {
-	return false;
-    }
     SEL sel = sel_registerName(token);
     return class_getInstanceMethod(klass, sel) != NULL;
 #endif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20091206/f4671d84/attachment-0001.html>


More information about the macruby-changes mailing list