Skip to content

Commit dea09f9

Browse files
committed
Runtime: caml_sys_random_seed returns a real array
1 parent 9ebcce6 commit dea09f9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

runtime/stdlib.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -837,7 +837,9 @@ function caml_sys_get_config () {
837837
//The function needs to return an array since OCaml 4.0...
838838
function caml_sys_random_seed () {
839839
var x = new Date()^0xffffffff*Math.random();
840-
return {valueOf:function(){return x;},0:0,1:x,length:2};
840+
var res = [0,x];
841+
res.valueOf = function(){return x};
842+
return res;
841843
}
842844
//Provides: caml_sys_const_big_endian const
843845
function caml_sys_const_big_endian () { return 0; }

0 commit comments

Comments
 (0)