class Bundler::Runtime

def setup_manpath

def setup_manpath
  # Add man/ subdirectories from activated bundles to MANPATH for man(1)
  manuals = $LOAD_PATH.map do |path|
    man_subdir = path.sub(/lib$/, "man")
    man_subdir unless Dir[man_subdir + "/man?/"].empty?
  end.compact
  return if manuals.empty?
  Bundler::SharedHelpers.set_env "MANPATH", manuals.concat(
    ENV["MANPATH"] ? ENV["MANPATH"].to_s.split(File::PATH_SEPARATOR) : [""]
  ).uniq.join(File::PATH_SEPARATOR)
end