diff options
Diffstat (limited to 'activesupport/CHANGELOG.md')
-rw-r--r-- | activesupport/CHANGELOG.md | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md index 457eb84a62..938d4f9d31 100644 --- a/activesupport/CHANGELOG.md +++ b/activesupport/CHANGELOG.md @@ -1,3 +1,35 @@ +* Fix modulo operations involving durations + + Rails 5.1 introduce an `ActiveSupport::Duration::Scalar` class as a wrapper + around a numeric value as a way of ensuring a duration was the outcome of + an expression. However the implementation was missing support for modulo + operations. This support has now been added and should result in a duration + being returned from expressions involving modulo operations. + + Prior to Rails 5.1: + + 5.minutes % 2.minutes + => 60 + + Now: + + 5.minutes % 2.minutes + => 1 minute + + Fixes #29603 and #29743. + + *Sayan Chakraborty*, *Andrew White* + +* Fix division where a duration is the denominator + + PR #29163 introduced a change in behavior when a duration was the denominator + in a calculation - this was incorrect as dividing by a duration should always + return a `Numeric`. The behavior of previous versions of Rails has been restored. + + Fixes #29592. + + *Andrew White* + * Add purpose and expiry support to `ActiveSupport::MessageVerifier` & `ActiveSupport::MessageEncryptor`. |