diff options
author | Guilherme Mansur <guilherme.mansur@shopify.com> | 2019-06-21 15:04:28 -0400 |
---|---|---|
committer | Guilherme Mansur <guilherme.mansur@shopify.com> | 2019-07-14 15:04:25 -0400 |
commit | 526a5eb10cbe6092389c07c9529eb44c50fb0af6 (patch) | |
tree | 40785bf1668863bb8c60a426935b06723b8ade45 /activerecord/lib/arel/expressions.rb | |
parent | 727da1d8cdcab3ff50e399053faf7ba84e05ce03 (diff) | |
download | rails-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 'activerecord/lib/arel/expressions.rb')
0 files changed, 0 insertions, 0 deletions