Refactor: minor one sub-stitution should do

Fixes #11458
This commit is contained in:
Karol Bucek 2019-12-23 19:03:10 +01:00
parent 51de4c2674
commit 32c306f28f

View file

@ -46,7 +46,7 @@ module LogStash::Util
def self.thread_info(thread)
# When the `thread` is dead, `Thread#backtrace` returns `nil`; fall back to an empty array.
backtrace = (thread.backtrace || []).map do |line|
line.gsub(LogStash::Environment::LOGSTASH_HOME, "[...]")
line.sub(LogStash::Environment::LOGSTASH_HOME, "[...]")
end
blocked_on = case backtrace.first