class Bootsnap::LoadPathCache::Path

def to_realpath

Experimental RBS support (using type sampling data from the type_fusion project).

def to_realpath: () -> Bootsnap::LoadPathCache::Path

This signature was generated using 18 samples from 3 applications.

def to_realpath
  return self if @real
  realpath = begin
    File.realpath(path)
  rescue Errno::ENOENT
    return self
  end
  if realpath == path
    @real = true
    self
  else
    Path.new(realpath, real: true)
  end
end