File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,8 +27,8 @@ def realpath
2727 location . absolute_path
2828 end
2929
30- def pretty_path
31- return '#<none>' unless path = self . path
30+ def self . pretty_path path
31+ return '#<none>' unless path
3232 use_short_path = CONFIG [ :use_short_path ]
3333
3434 case
@@ -45,6 +45,10 @@ def pretty_path
4545 end
4646 end
4747
48+ def pretty_path
49+ FrameInfo . pretty_path path
50+ end
51+
4852 def name
4953 # p frame_type: frame_type, self: self
5054 case frame_type
Original file line number Diff line number Diff line change @@ -74,7 +74,7 @@ def skip_with_pattern?(tp)
7474 end
7575
7676 def out tp , msg = nil , depth = caller . size - 1
77- location_str = colorize ( "#{ tp . path } :#{ tp . lineno } " , [ :GREEN ] )
77+ location_str = colorize ( "#{ FrameInfo . pretty_path ( tp . path ) } :#{ tp . lineno } " , [ :GREEN ] )
7878 buff = "#{ header ( depth ) } #{ msg } at #{ location_str } "
7979
8080 if false # TODO: Ractor.main?
You can’t perform that action at this time.
0 commit comments