Skip to content

Commit 079ab26

Browse files
committed
Replace rand with arc4random
Swift 2.3 won't compile with `rand`.
1 parent 96b269d commit 079ab26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

RxCocoa/Common/CocoaUnits/Driver/Driver.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public func driveOnScheduler(scheduler: SchedulerType, action: () -> ()) {
211211

212212
func _forceCompilerToStopDoingInsaneOptimizationsThatBreakCode(scheduler: SchedulerType) {
213213
let a: Int32 = 1
214-
let b = 314 + Int32(rand() & 1)
214+
let b = 314 + Int32(arc4random() & 1)
215215
if a == b {
216216
print(scheduler)
217217
}

0 commit comments

Comments
 (0)