diff --git a/basis/random/random-tests.factor b/basis/random/random-tests.factor index da8d4a1844..96dc8cc783 100644 --- a/basis/random/random-tests.factor +++ b/basis/random/random-tests.factor @@ -30,3 +30,6 @@ IN: random.tests [ 3 ] [ { 1 2 3 4 } 3 sample prune length ] unit-test [ 99 ] [ 100 99 sample prune length ] unit-test + +[ ] +[ [ 100 random-bytes ] with-system-random drop ] unit-test diff --git a/basis/random/random.factor b/basis/random/random.factor index 1f2408556f..197c232404 100755 --- a/basis/random/random.factor +++ b/basis/random/random.factor @@ -22,7 +22,7 @@ M: object random-bytes* ( n tuple -- byte-array ) [ 2drop ] [ random-32* 4 >le swap head over push-all ] if ] bi-curry bi* ; -M: object random-32* ( tuple -- r ) 4 random-bytes* le> ; +M: object random-32* ( tuple -- r ) 4 swap random-bytes* le> ; ERROR: no-random-number-generator ;