Skip to content

Commit d23f585

Browse files
committed
Abbreviate gem directories from thread pretty name
1 parent 7d9c6d4 commit d23f585

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/vernier/output/firefox.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,8 @@ def pretty_name(name)
397397
return name unless name.start_with?("#<Thread")
398398
pretty = []
399399
obj_address = name[/Thread:(0x\w+)/,1]
400-
best_id = name[/\#<Thread:0x\w+@?\s?(.*)\s+\S+>/,1]
400+
best_id = name[/\#<Thread:0x\w+@?\s?(.*)\s+\S+>/,1] || ""
401+
Gem.path.each { |gem_dir| best_id = best_id.gsub(gem_dir, "...") }
401402
pretty << best_id unless best_id.empty?
402403
pretty << "(#{obj_address})"
403404
pretty.join(' ')

0 commit comments

Comments
 (0)