aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--activesupport/CHANGELOG.md4
-rw-r--r--guides/source/4_2_release_notes.md4
2 files changed, 6 insertions, 2 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md
index a935d33686..f9df972929 100644
--- a/activesupport/CHANGELOG.md
+++ b/activesupport/CHANGELOG.md
@@ -63,7 +63,7 @@
*Guo Xiang Tan*
-* Added instance_eval version to Object#try, so you can do this:
+* Added instance_eval version to Object#try and Object#try!, so you can do this:
person.try { name.first }
@@ -71,7 +71,7 @@
person.try { |person| person.name.first }
- *DHH*
+ *DHH*, *Ari Pollak*
* Fix the `ActiveSupport::Duration#instance_of?` method to return the right
value with the class itself since it was previously delegated to the
diff --git a/guides/source/4_2_release_notes.md b/guides/source/4_2_release_notes.md
index a598c7c319..d903752cff 100644
--- a/guides/source/4_2_release_notes.md
+++ b/guides/source/4_2_release_notes.md
@@ -750,6 +750,10 @@ Please refer to the [Changelog][active-support] for detailed changes.
### Notable changes
+* `Object#try` and `Object#try!` can now be used without an explicit receiver.
+ ([Commit](https://github.com/rails/rails/commit/5e51bdda59c9ba8e5faf86294e3e431bd45f1830),
+ [Pull Request](https://github.com/rails/rails/pull/17361))
+
* Introduced new configuration option `active_support.test_order` for
specifying the order test cases are executed. This option currently defaults
to `:sorted` but will be changed to `:random` in Rails 5.0.