Skip to content

Commit 0733150

Browse files
committed
[util] fix bug with backtraces (only happened with Ruby < 2.2)
1 parent 447dfa5 commit 0733150

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/appoptics_apm/api/util.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def trim_backtrace(backtrace)
4545
return backtrace unless backtrace.is_a?(Array) && backtrace.size > BACKTRACE_CUTOFF
4646

4747
# Trim backtraces by getting the first 180 and last 20 lines
48-
backtrace[0, 180] + ['...[snip]...'] + backtrace[length - 20, 20]
48+
backtrace[0, 180] + ['...[snip]...'] + backtrace[backtrace.size - 20, 20]
4949
end
5050

5151
# Internal: Check if a host is blacklisted from tracing

0 commit comments

Comments
 (0)