U:RDoc::NormalClass[iI"
Range:ET@I"Object;To:RDoc::Markup::Document:@parts[o;;[ :
@fileI"#ext/json/lib/json/add/range.rb;T:0@omit_headings_from_table_of_contents_below0o;;[o:RDoc::Markup::Paragraph;[
I"JA Range represents an interval---a set of values with a ;TI"?beginning and an end. Ranges may be constructed using the ;TI"-s..e and ;TI"<s...e literals, or with ;TI":Range::new. Ranges constructed using .. ;TI"Hrun from the beginning to the end inclusively. Those created using ;TI"G... exclude the end value. When used as an iterator, ;TI".ranges return each value in the sequence.;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim;[ I"(-1..-5).to_a #=> []
;TI"1(-5..-1).to_a #=> [-5, -4, -3, -2, -1]
;TI"6('a'..'e').to_a #=> ["a", "b", "c", "d", "e"]
;TI"1('a'...'e').to_a #=> ["a", "b", "c", "d"]
;T:@format0S:RDoc::Markup::Heading:
leveli: textI"Custom Objects in Ranges;T@o;;[I"FRanges can be constructed using any objects that can be compared ;TI"*using the <=> operator. ;TI"MMethods that treat the range as a sequence (#each and methods inherited ;TI"=from Enumerable) expect the begin object to implement a ;TI"Esucc method to return the next object in sequence. ;TI"7The #step and #include? methods require the begin ;TI"