method
inclusion_method
v3.2.13 -
Show latest stable
- Class:
ActiveModel::Validations::InclusionValidator
inclusion_method(enumerable)private
In Ruby 1.9 Range#include? on non-numeric ranges checks all possible values in the range for equality, so it may be slow for large ranges. The new Range#cover? uses the previous logic of comparing a value with the range endpoints.