From 4db6ac29f24f3d38401f4cf243a7a70b07e964e1 Mon Sep 17 00:00:00 2001 From: Jon McCartie Date: Thu, 21 Jul 2016 16:47:27 -0500 Subject: Adds `not_in?` onto Object --- activesupport/CHANGELOG.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'activesupport/CHANGELOG.md') diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index b24f9e6987..70bfd29393 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,3 +1,15 @@ +* Introduce `not_in?` on `Object`. + + As an opposite method for `in?`, `not_in?` provides equivalent support for exclusion. This turns this: + + [1,2].exclude?(user_id) + + ...into this: + + user_id.not_in?([1,2]) + + *Jon McCartie* + * Defines `Regexp.match?` for Ruby versions prior to 2.4. The predicate has the same interface, but it does not have the performance boost. It's purpose is to be able to write 2.4 compatible code. -- cgit v1.2.3