aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/CHANGELOG.md
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/CHANGELOG.md')
-rw-r--r--activesupport/CHANGELOG.md62
1 files changed, 62 insertions, 0 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md
index 773182056b..d9f23c55ba 100644
--- a/activesupport/CHANGELOG.md
+++ b/activesupport/CHANGELOG.md
@@ -1,2 +1,64 @@
+* Remove deprecated arguments in `assert_nothing_raised`.
+
+ *Rafel Mendonça França*
+
+* `Date.to_s` doesn't produce too many spaces. For example, `to_s(:short)`
+ will now produce `01 Feb` instead of ` 1 Feb`.
+
+ Fixes #25251.
+
+ *Sean Griffin*
+
+* Introduce Module#delegate_missing_to.
+
+ When building a decorator, a common pattern emerges:
+
+ class Partition
+ def initialize(first_event)
+ @events = [ first_event ]
+ end
+
+ def people
+ if @events.first.detail.people.any?
+ @events.collect { |e| Array(e.detail.people) }.flatten.uniq
+ else
+ @events.collect(&:creator).uniq
+ end
+ end
+
+ private
+ def respond_to_missing?(name, include_private = false)
+ @events.respond_to?(name, include_private)
+ end
+
+ def method_missing(method, *args, &block)
+ @events.send(method, *args, &block)
+ end
+ end
+
+ With `Module#delegate_missing_to`, the above is condensed to:
+
+ class Partition
+ delegate_missing_to :@events
+
+ def initialize(first_event)
+ @events = [ first_event ]
+ end
+
+ def people
+ if @events.first.detail.people.any?
+ @events.collect { |e| Array(e.detail.people) }.flatten.uniq
+ else
+ @events.collect(&:creator).uniq
+ end
+ end
+ end
+
+ *Genadi Samokovarov*, *DHH*
+
+* Rescuable: If a handler doesn't match the exception, check for handlers
+ matching the exception's cause.
+
+ *Jeremy Daer*
Please check [5-0-stable](https://github.com/rails/rails/blob/5-0-stable/activesupport/CHANGELOG.md) for previous changes.