From 5c14eb0b4ea3bde067bc8fce7ed99f5f10ab16ff Mon Sep 17 00:00:00 2001 From: Kasper Timm Hansen Date: Fri, 24 May 2019 22:54:20 +0200 Subject: Address 639d7be. Readd changelog line; remove needless explicit return. --- activesupport/CHANGELOG.md | 1 + activesupport/lib/active_support/core_ext/module/delegation.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3