| Server IP : 162.214.74.102 / Your IP : 216.73.217.21 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/proc/self/root/opt/cpanel/ea-ruby24/root/usr/share/ri/system/Random/ |
Upload File : |
U:RDoc::AnyMethod[iI" rand:ETI"Random#rand;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"LWhen +max+ is an Integer, +rand+ returns a random integer greater than ;TI"Jor equal to zero and less than +max+. Unlike Kernel.rand, when +max+ ;TI"Cis a negative integer or zero, +rand+ raises an ArgumentError.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"prng = Random.new ;TI""prng.rand(100) # => 42 ;T:@format0o; ; [I"JWhen +max+ is a Float, +rand+ returns a random floating point number ;TI">between 0.0 and +max+, including 0.0 and excluding +max+.;T@o;; [I"2prng.rand(1.5) # => 1.4600282860034115 ;T; 0o; ; [I"AWhen +max+ is a Range, +rand+ returns a random number where ;TI"#range.member?(number) == true.;T@o;; [ I"6prng.rand(5..9) # => one of [5, 6, 7, 8, 9] ;TI"3prng.rand(5...9) # => one of [5, 6, 7, 8] ;TI"Bprng.rand(5.0..9.0) # => between 5.0 and 9.0, including 9.0 ;TI"Bprng.rand(5.0...9.0) # => between 5.0 and 9.0, excluding 9.0 ;T; 0o; ; [I"PBoth the beginning and ending values of the range must respond to subtract ;TI"E(<tt>-</tt>) and add (<tt>+</tt>)methods, or rand will raise an ;TI"ArgumentError.;T: @fileI" random.c;T:0@omit_headings_from_table_of_contents_below0I"1prng.rand -> float prng.rand(max) -> number ;T0[ I"(*args);T@+FI"Random;FcRDoc::NormalClass00