PATH:
opt
/
alt
/
ruby18
/
share
/
ri
/
1.8
/
system
/
Kernel
--- !ruby/object:RI::MethodDescription aliases: [] block_params: comment: - !ruby/struct:SM::Flow::P body: Converts <em>max</em> to an integer using max1 = max<tt>.to_i.abs</tt>. If the result is zero, returns a pseudorandom floating point number greater than or equal to 0.0 and less than 1.0. Otherwise, returns a pseudorandom integer greater than or equal to zero and less than max1. <tt>Kernel::srand</tt> may be used to ensure repeatable sequences of random numbers between different runs of the program. Ruby currently uses a modified Mersenne Twister with a period of 2**19937-1. - !ruby/struct:SM::Flow::VERB body: " srand 1234 #=> 0\n [ rand, rand ] #=> [0.191519450163469, 0.49766366626136]\n [ rand(10), rand(1000) ] #=> [6, 817]\n srand 1234 #=> 1234\n [ rand, rand ] #=> [0.191519450163469, 0.49766366626136]\n" full_name: Kernel#rand is_singleton: false name: rand params: | rand(max=0) => number visibility: public
[-] trap-i.yaml
[edit]
[-] chop-i.yaml
[edit]
[-] URI-i.yaml
[edit]
[-] gsub%21-i.yaml
[edit]
[-] fail-i.yaml
[edit]
[-] lambda-i.yaml
[edit]
[-] fork-i.yaml
[edit]
[-] autoload-i.yaml
[edit]
[-] abort-i.yaml
[edit]
[-] readlines-i.yaml
[edit]
[-] exec-i.yaml
[edit]
[-] __method__-i.yaml
[edit]
[-] readline-i.yaml
[edit]
[-] Integer-i.yaml
[edit]
[-] eval-i.yaml
[edit]
[-] open_uri_original_open-i.yaml
[edit]
[-] autoload%3f-i.yaml
[edit]
[-] scan-i.yaml
[edit]
[-] at_exit-i.yaml
[edit]
[-] p-i.yaml
[edit]
[-] y-i.yaml
[edit]
[-] syscall-i.yaml
[edit]
[-] sub%21-i.yaml
[edit]
[-] warn-i.yaml
[edit]
[-] caller-i.yaml
[edit]
[-] print-i.yaml
[edit]
[-] Float-i.yaml
[edit]
[-] scanf-i.yaml
[edit]
[-] open-i.yaml
[edit]
[-] split-i.yaml
[edit]
[-] sub-i.yaml
[edit]
[-] catch-i.yaml
[edit]
[-] raise-i.yaml
[edit]
[-] gsub-i.yaml
[edit]
[-] sprintf-i.yaml
[edit]
[-] iterator%3f-i.yaml
[edit]
[-] binding-i.yaml
[edit]
[-] putc-i.yaml
[edit]
[-] pp-i.yaml
[edit]
[-] pretty_inspect-i.yaml
[edit]
[-] getc-i.yaml
[edit]
[-] %60-i.yaml
[edit]
[-] chomp-i.yaml
[edit]
[-] load-i.yaml
[edit]
[-] exit-i.yaml
[edit]
[-] srand-i.yaml
[edit]
[-] block_given%3f-i.yaml
[edit]
[-] trace_var-i.yaml
[edit]
[-] callcc-i.yaml
[edit]
[-] Array-i.yaml
[edit]
[-] test-i.yaml
[edit]
[-] loop-i.yaml
[edit]
[-] format-i.yaml
[edit]
[-] gets-i.yaml
[edit]
[-] method_missing-i.yaml
[edit]
[-] chop%21-i.yaml
[edit]
[-] proc-i.yaml
[edit]
[-] throw-i.yaml
[edit]
[-] exit%21-i.yaml
[edit]
[-] global_variables-i.yaml
[edit]
[-] printf-i.yaml
[edit]
[+]
..
[-] require-i.yaml
[edit]
[-] String-i.yaml
[edit]
[-] select-i.yaml
[edit]
[-] set_trace_func-i.yaml
[edit]
[-] chomp%21-i.yaml
[edit]
[-] sleep-i.yaml
[edit]
[-] Pathname-i.yaml
[edit]
[-] untrace_var-i.yaml
[edit]
[-] rand-i.yaml
[edit]
[-] cdesc-Kernel.yaml
[edit]
[-] system-i.yaml
[edit]
[-] local_variables-i.yaml
[edit]
[-] puts-i.yaml
[edit]