Index: Source/Additions/GSCompatibility.m =================================================================== --- Source/Additions/GSCompatibility.m (Revision 28408) +++ Source/Additions/GSCompatibility.m (Arbeitskopie) @@ -394,6 +394,7 @@ @implementation NSString(GSCompatibility) +#if OS_API_VERSION (MAC_OS_X_VERSION_10_2,MAC_OS_X_VERSION_10_5) // From GNUStep /** * If the string consists of the words 'true' or 'yes' (case insensitive) @@ -402,16 +403,20 @@ */ - (BOOL) boolValue { - if ([self caseInsensitiveCompare: @"YES"] == NSOrderedSame) + static NSCharacterSet *yes = nil; + + if (yes == nil) { - return YES; + yes = RETAIN([NSCharacterSet characterSetWithCharactersInString: + @"123456789yYtT"]); } - if ([self caseInsensitiveCompare: @"true"] == NSOrderedSame) + if ([self rangeOfCharacterFromSet: yes].length > 0) { - return YES; + return YES; } - return [self intValue] != 0 ? YES : NO; + return NO; } +#endif - (NSString*) substringFromRange:(NSRange)range {