lib/airbrake/user_informer.rb in airbrake-3.1.12 vs lib/airbrake/user_informer.rb in airbrake-3.1.13
- old
+ new
@@ -20,10 +20,10 @@
replace = replacement(env['airbrake.error_id'])
body.each do |chunk|
new_body << chunk.gsub("<!-- AIRBRAKE ERROR -->", replace)
end
body.close if body.respond_to?(:close)
- headers['Content-Length'] = new_body.sum(&:bytesize).to_s
+ headers['Content-Length'] = new_body.inject(0){|sum, x| sum + x.bytesize}.to_s
body = new_body
end
[status, headers, body]