Flowdock
method

inclusion_method

Importance_1
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: Clusivity
inclusion_method(enumerable) private

After Ruby 2.2, Range#include? on non-number-or-time-ish ranges checks all possible values in the range for equality, which is slower but more accurate. Range#cover? uses the previous logic of comparing a value with the range endpoints, which is fast but is only accurate on Numeric, Time, Date, or DateTime ranges.

Show source
Register or log in to add new notes.