@@ -18,10 +18,11 @@ #include #import "OFMutableDictionary_hashtable.h" #import "OFArray.h" +#import "OFString.h" static struct { Class isa; } placeholder; @@ -173,10 +174,28 @@ forKeyedSubscript: (id)key { [self setObject: object forKey: key]; } + +- (void)setValue: (id)value + forKey: (OFString*)key +{ + if ([key hasPrefix: @"@"]) { + void *pool = objc_autoreleasePoolPush(); + + key = [key substringWithRange: of_range(1, [key length] - 1)]; + [super setValue: value + forKey: key]; + + objc_autoreleasePoolPop(pool); + return; + } + + [self setObject: value + forKey: key]; +} - (void)removeObjectForKey: (id)key { OF_UNRECOGNIZED_SELECTOR }