PATH:
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Range
U:RDoc::AnyMethod[iI"%:ETI"Range#%;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"@Same as #step (but doesn't provide default value for +n+). ;TI"YThe method is convenient for experssive producing of Enumerator::ArithmeticSequence.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"#array = [0, 1, 2, 3, 4, 5, 6] ;TI" ;TI""# slice each second element: ;TI"&seq = (0..) % 2 #=> ((0..).%(2)) ;TI"!array[seq] #=> [0, 2, 4, 6] ;TI"# or just ;TI"'array[(0..) % 2] #=> [0, 2, 4, 6] ;T:@format0o; ; [I"ZNote that due to operator precedence in Ruby, parentheses are mandatory around range ;TI"in this case:;T@o;; [I"1(0..7) % 2 #=> ((0..7).%(2)) -- as expected ;TI".0..7 % 2 #=> 0..1 -- parsed as 0..(7 % 2);T; 0: @fileI"range.c;T:0@omit_headings_from_table_of_contents_below0I"^%(n) {|element| ... } -> self %(n) -> enumerator or arithmetic_sequence ;T0[ I" (p1);T@!FI" Range;TcRDoc::NormalClass00
[-] last-i.ri
[edit]
[-] include%3f-i.ri
[edit]
[-] count-i.ri
[edit]
[-] size-i.ri
[edit]
[-] bsearch-i.ri
[edit]
[-] end-i.ri
[edit]
[-] to_s-i.ri
[edit]
[-] max-i.ri
[edit]
[-] to_json-i.ri
[edit]
[-] first-i.ri
[edit]
[-] as_json-i.ri
[edit]
[-] reverse_each-i.ri
[edit]
[-] cover%3f-i.ri
[edit]
[-] to_a-i.ri
[edit]
[-] new-c.ri
[edit]
[-] minmax-i.ri
[edit]
[-] json_create-c.ri
[edit]
[-] min-i.ri
[edit]
[-] hash-i.ri
[edit]
[-] each-i.ri
[edit]
[-] step-i.ri
[edit]
[-] %3d%3d%3d-i.ri
[edit]
[-] eql%3f-i.ri
[edit]
[-] cdesc-Range.ri
[edit]
[-] member%3f-i.ri
[edit]
[-] %25-i.ri
[edit]
[-] exclude_end%3f-i.ri
[edit]
[-] begin-i.ri
[edit]
[-] overlap%3f-i.ri
[edit]
[+]
..
[-] entries-i.ri
[edit]
[-] %3d%3d-i.ri
[edit]
[-] inspect-i.ri
[edit]