From ca2a3bcaad04b522a08b89aafaf0ecb6db7d05ca Mon Sep 17 00:00:00 2001 From: Owen Stephens Date: Thu, 28 Mar 2019 00:57:05 +0000 Subject: Fix bug in Range comparisons when comparing to excluded-end Range Before: ```ruby (1..10).cover?(1...11) => false ``` After: ```ruby (1..10).cover?(1...11) => true ``` See https://git.io/fjTtz for the commit against Ruby core that added support for Range arguments, with similar handling of this case. --- activesupport/CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'activesupport/CHANGELOG.md') diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index 0551f0781f..f30249cb3f 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,3 +1,17 @@ +* Fix bug in Range comparisons when comparing to an excluded-end Range + + Before: + + (1..10).cover?(1...11) => false + + After: + + (1..10).cover?(1...11) => true + + With the same change for `Range#include?` and `Range#===`. + + *Owen Stephens* + * Use weak references in descendants tracker to allow anonymous subclasses to be garbage collected. -- cgit v1.2.3