aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-08-06 02:26:05 +0900
committerGitHub <noreply@github.com>2018-08-06 02:26:05 +0900
commit5f939a770d9c317b62fb3c63cdac5bac12c94a8f (patch)
treed7cd78837aa6b001237be2ab13e2e90e21b66ed5 /activesupport
parent47018a829ceed958c9765ec7678eae476a51c18e (diff)
parent7867603fbbf5dc3327be3c3ff7c245614e21c04a (diff)
downloadrails-5f939a770d9c317b62fb3c63cdac5bac12c94a8f.tar.gz
rails-5f939a770d9c317b62fb3c63cdac5bac12c94a8f.tar.bz2
rails-5f939a770d9c317b62fb3c63cdac5bac12c94a8f.zip
Merge pull request #33531 from bogdanvlviv/move-changelog-entry-of-47018a82-up
Move changelog entry of 47018a82 up [ci skip]
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/CHANGELOG.md22
1 files changed, 11 insertions, 11 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md
index c966cf45d5..5423d59984 100644
--- a/activesupport/CHANGELOG.md
+++ b/activesupport/CHANGELOG.md
@@ -1,3 +1,10 @@
+* Support not to cache `nil` for `ActiveSupport::Cache#fetch`.
+
+ cache.fetch('bar', skip_nil: true) { nil }
+ cache.exist?('bar') # => false
+
+ *Martin Hong*
+
* Add "event object" support to the notification system.
Before this change, end users were forced to create hand made artisanal
event objects on their own, like this:
@@ -5,11 +12,11 @@
ActiveSupport::Notifications.subscribe('wait') do |*args|
@event = ActiveSupport::Notifications::Event.new(*args)
end
-
+
ActiveSupport::Notifications.instrument('wait') do
sleep 1
end
-
+
@event.duration # => 1000.138
After this change, if the block passed to `subscribe` only takes one
@@ -19,11 +26,11 @@
ActiveSupport::Notifications.subscribe('wait') do |event|
@event = event
end
-
+
ActiveSupport::Notifications.instrument('wait') do
sleep 1
end
-
+
p @event.allocations # => 7
p @event.cpu_time # => 0.256
p @event.idle_time # => 1003.2399
@@ -179,12 +186,5 @@
*Eileen M. Uchitelle*, *Aaron Patterson*
-* Support not to cache `nil` for `ActiveSupport::Cache#fetch`
-
- cache.fetch('bar', skip_nil: true) { nil }
- cache.exist?('bar') # => false
-
- *Martin Hong*
-
Please check [5-2-stable](https://github.com/rails/rails/blob/5-2-stable/activesupport/CHANGELOG.md) for previous changes.