Kernel#rand method.