aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/CHANGELOG.md
diff options
context:
space:
mode:
authorGuilherme Mansur <guilherme.mansur@shopify.com>2019-06-21 15:04:28 -0400
committerGuilherme Mansur <guilherme.mansur@shopify.com>2019-07-14 15:04:25 -0400
commit526a5eb10cbe6092389c07c9529eb44c50fb0af6 (patch)
tree40785bf1668863bb8c60a426935b06723b8ade45 /actionview/CHANGELOG.md
parent727da1d8cdcab3ff50e399053faf7ba84e05ce03 (diff)
downloadrails-526a5eb10cbe6092389c07c9529eb44c50fb0af6.tar.gz
rails-526a5eb10cbe6092389c07c9529eb44c50fb0af6.tar.bz2
rails-526a5eb10cbe6092389c07c9529eb44c50fb0af6.zip
Empty array instead of nil for source_extract
The source_extract method will return nil when it can't find the file name in the backtrace, methods that consume this method expect an array and the nil ends up causing type errors down the road like it happened here: #36341. This patch refactors the source_extract method so that it returns an empty array instead of nil when it can't find the source code. Co-authored-by: Kasper Timm Hansen <kaspth@gmail.com>
Diffstat (limited to 'actionview/CHANGELOG.md')
-rw-r--r--actionview/CHANGELOG.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/actionview/CHANGELOG.md b/actionview/CHANGELOG.md
index f2f57e6a36..504b1d3e98 100644
--- a/actionview/CHANGELOG.md
+++ b/actionview/CHANGELOG.md
@@ -1,3 +1,8 @@
+* annotated_source_code returns an empty array so TemplateErrors without a
+ template in the backtrace are surfaced properly by DebugExceptions.
+
+ *Guilherme Mansur*, *Kasper Timm Hansen*
+
* Add autoload for SyntaxErrorInTemplate so syntax errors are correctly raised by DebugExceptions.
*Guilherme Mansur*, *Gannon McGibbon*