Skip to content

Commit 8602d9a

Browse files
authored
Merge pull request #1109 from ianpartridge/systemlocale
2 parents 54f47e4 + 483f2ff commit 8602d9a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Foundation/NSJSONSerialization.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ private struct JSONWriter {
533533
}
534534
let options: NSString.CompareOptions = [.numeric, .caseInsensitive, .forcedOrdering]
535535
let range: Range<String.Index> = a.startIndex..<a.endIndex
536-
let locale = NSLocale.systemLocale()
536+
let locale = NSLocale.system
537537

538538
return a.compare(b, options: options, range: range, locale: locale) == .orderedAscending
539539
})

Foundation/NSLocale.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ extension NSLocale {
8484
return CFLocaleCopyCurrent()._swiftObject
8585
}
8686

87-
open class func systemLocale() -> Locale {
87+
open class var system: Locale {
8888
return CFLocaleGetSystem()._swiftObject
8989
}
9090
}

0 commit comments

Comments
 (0)