module DEBUGGER__

def self.require_location

nil for -r
String for requiring location
def self.require_location
  locs = caller_locations
  dir_prefix = /#{Regexp.escape(__dir__)}/
  locs.each do |loc|
    case loc.absolute_path
    when dir_prefix
    when %r{rubygems/core_ext/kernel_require\.rb}
    when %r{bundled_gems\.rb}
    else
      return loc if loc.absolute_path
    end
  end
  nil
end