Revision
3079
Author
neeracher@apple.com
Date
2009-12-06 17:49:48 -0800 (Sun, 06 Dec 2009)

Log Message

Don't omit test for :

Modified Paths

Diff

Modified: MacRuby/trunk/vm.cpp (3078 => 3079)


--- 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