Commit a0b674b946a035a855298b442e0056f1a1964f66

Authored by Nathan Broadbent
1 parent 70c06f1f
Exists in master and in 1 other branch production

Handle nil backtrace files

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
app/models/notice.rb
... ... @@ -98,7 +98,7 @@ class Notice
98 98 # If gems are vendored into project, treat vendored gem dir as [GEM_ROOT]
99 99 (read_attribute(:backtrace) || []).map do |line|
100 100 # Changes "[PROJECT_ROOT]/rubygems/ruby/1.9.1/gems" to "[GEM_ROOT]/gems"
101   - line.merge 'file' => line['file'].gsub(/\[PROJECT_ROOT\]\/.*\/ruby\/[0-9.]+\/gems/, '[GEM_ROOT]/gems')
  101 + line.merge 'file' => line['file'].to_s.gsub(/\[PROJECT_ROOT\]\/.*\/ruby\/[0-9.]+\/gems/, '[GEM_ROOT]/gems')
102 102 end
103 103 end
104 104  
... ...