* Source/NSNumberFormatter.m (-stringForObjectValue:): Swapped a

few lines of fraction handling code to get the test suite to pass.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32693 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2011-03-23 19:33:03 +00:00
parent 2a50497248
commit 37d3a7c31a
2 changed files with 9 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2011-03-23 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSNumberFormatter.m (-stringForObjectValue:): Swapped a
few lines of fraction handling code to get the test suite to pass.
2011-03-22 Wolfgang Lux <wolfgang.lux@gmail.com> 2011-03-22 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSObject.m (-methodSignatureForSelector:): Get method * Source/NSObject.m (-methodSignatureForSelector:): Get method

View file

@ -1221,10 +1221,6 @@ static NSUInteger _defaultBehavior = NSNumberFormatterBehavior10_4;
fracPart = [fracPart decimalNumberByMultiplyingByPowerOf10: fracPart = [fracPart decimalNumberByMultiplyingByPowerOf10:
decimalPlaces]; decimalPlaces];
ms = [[fracPart descriptionWithLocale: locale] mutableCopy]; ms = [[fracPart descriptionWithLocale: locale] mutableCopy];
[ms replaceOccurrencesOfString: @"0"
withString: @""
options: (NSBackwardsSearch | NSAnchoredSearch)
range: NSMakeRange(0, [ms length])];
if ([fracPad length] > [ms length]) if ([fracPad length] > [ms length])
{ {
NSRange fpRange; NSRange fpRange;
@ -1246,6 +1242,10 @@ static NSUInteger _defaultBehavior = NSNumberFormatterBehavior10_4;
options: 0 options: 0
range: NSMakeRange(0, [ms length])]; range: NSMakeRange(0, [ms length])];
} }
[ms replaceOccurrencesOfString: @"0"
withString: @""
options: (NSBackwardsSearch | NSAnchoredSearch)
range: NSMakeRange(0, [ms length])];
fracPartString = AUTORELEASE(ms); fracPartString = AUTORELEASE(ms);
} }
else else