aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2019-05-24 22:54:20 +0200
committerKasper Timm Hansen <kaspth@gmail.com>2019-05-24 22:54:20 +0200
commit5c14eb0b4ea3bde067bc8fce7ed99f5f10ab16ff (patch)
treea12f0d278202130b9a398e04c08c1a41ebd020bf
parent8f5b271d031d8af2046470c34638a5c1e24f9243 (diff)
downloadrails-5c14eb0b4ea3bde067bc8fce7ed99f5f10ab16ff.tar.gz
rails-5c14eb0b4ea3bde067bc8fce7ed99f5f10ab16ff.tar.bz2
rails-5c14eb0b4ea3bde067bc8fce7ed99f5f10ab16ff.zip
Address 639d7be. Readd changelog line; remove needless explicit return.
-rw-r--r--activesupport/CHANGELOG.md1
-rw-r--r--activesupport/lib/active_support/core_ext/module/delegation.rb2
2 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/CHANGELOG.md b/activesupport/CHANGELOG.md
index 3d1dd41085..955eb7eef9 100644
--- a/activesupport/CHANGELOG.md
+++ b/activesupport/CHANGELOG.md
@@ -25,4 +25,5 @@
*Jordan Thomas*
+
Please check [6-0-stable](https://github.com/rails/rails/blob/6-0-stable/activesupport/CHANGELOG.md) for previous changes.
diff --git a/activesupport/lib/active_support/core_ext/module/delegation.rb b/activesupport/lib/active_support/core_ext/module/delegation.rb
index 2f88010d27..b8996ecb10 100644
--- a/activesupport/lib/active_support/core_ext/module/delegation.rb
+++ b/activesupport/lib/active_support/core_ext/module/delegation.rb
@@ -297,7 +297,7 @@ class Module
rescue NoMethodError
if #{target}.nil?
if #{allow_nil == true}
- return nil
+ nil
else
raise DelegationError, "\#{method} delegated to #{target}, but #{target} is nil"
end