class DEBUGGER__::FrameInfo

def self.pretty_path path

def self.pretty_path path
  return '#<none>' unless path
  use_short_path = CONFIG[:use_short_path]
  case
  when use_short_path && path.start_with?(dir = RbConfig::CONFIG["rubylibdir"] + '/')
    path.sub(dir, '$(rubylibdir)/')
  when use_short_path && Gem.path.any? do |gp|
      path.start_with?(dir = gp + '/gems/')
    end
    path.sub(dir, '$(Gem)/')
  when HOME && path.start_with?(HOME)
    path.sub(HOME, '~/')
  else
    path
  end
end