PATH:
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Range
U:RDoc::AnyMethod[iI" overlap?:ETI"Range#overlap?;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"GReturns +true+ if +range+ overlaps with +self+, +false+ otherwise:;To:RDoc::Markup::BlankLine o:RDoc::Markup::Verbatim; [I"$(0..2).overlap?(1..3) #=> true ;TI"%(0..2).overlap?(3..4) #=> false ;TI"$(0..).overlap?(..0) #=> true ;T:@format0o; ; [I"/With non-range argument, raises TypeError.;T@o;; [I",(1..3).overlap?(1) # TypeError ;T; 0o; ; [I"IReturns +false+ if an internal call to <tt>#<=></tt> returns +nil+; ;TI".that is, the operands are not comparable.;T@o;; [I"+(1..3).overlap?('a'..'d') # => false ;T; 0o; ; [I"HReturns +false+ if +self+ or +range+ is empty. "Empty range" means ;TI"Dthat its begin value is larger than, or equal for an exclusive ;TI"range, its end value.;T@o;; [I"+(4..1).overlap?(2..3) # => false ;TI"+(4..1).overlap?(..3) # => false ;TI"+(4..1).overlap?(2..) # => false ;TI"+(2...2).overlap?(1..2) # => false ;TI" ;TI"+(1..4).overlap?(3..2) # => false ;TI"+(..4).overlap?(3..2) # => false ;TI"+(1..).overlap?(3..2) # => false ;TI"+(1..2).overlap?(2...2) # => false ;T; 0o; ; [I"EReturns +false+ if the begin value one of +self+ and +range+ is ;TI"Glarger than, or equal if the other is an exclusive range, the end ;TI"value of the other:;T@o;; [ I"+(4..5).overlap?(2..3) # => false ;TI"+(4..5).overlap?(2...4) # => false ;TI" ;TI"+(1..2).overlap?(3..4) # => false ;TI"+(1...3).overlap?(3..4) # => false ;T; 0o; ; [I"CReturns +false+ if the end value one of +self+ and +range+ is ;TI"Hlarger than, or equal for an exclusive range, the end value of the ;TI"other:;T@o;; [ I"+(4..5).overlap?(2..3) # => false ;TI"+(4..5).overlap?(2...4) # => false ;TI" ;TI"+(1..2).overlap?(3..4) # => false ;TI"+(1...3).overlap?(3..4) # => false ;T; 0o; ; [I"LNote that the method wouldn't make any assumptions about the beginless ;TI"Hrange being actually empty, even if its upper bound is the minimum ;TI"Apossible value of its type, so all this would return +true+:;T@o;; [I"C(...-Float::INFINITY).overlap?(...-Float::INFINITY) # => true ;TI"'(..."").overlap?(..."") # => true ;TI"'(...[]).overlap?(...[]) # => true ;T; 0o; ; [I"OEven if those ranges are effectively empty (no number can be smaller than ;TI"G<tt>-Float::INFINITY</tt>), they are still considered overlapping ;TI"with themselves.;T@o; ; [I"Related: Range#cover?.;T: @fileI"range.c;T:0@omit_headings_from_table_of_contents_below0I"&overlap?(range) -> true or false ;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]