Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC] Improve documentation of :include: directive file search #1083

Merged
merged 1 commit into from
Mar 9, 2024

Conversation

p8
Copy link
Contributor

@p8 p8 commented Jan 18, 2024

The current documentation is incorrect.

  1. "The current directory" is searched before the --include directories.

    See:

    def find_include_file(name)
    to_search = [File.dirname(@input_file_name)].concat @include_path
    to_search.each do |dir|
    full_name = File.join(dir, name)
    stat = File.stat(full_name) rescue next
    return full_name if stat.readable?
    end
    nil
    end

  2. "Searching the file by default in the current directory" could be read as "searching the file in the directory from which RDoc is run". This is incorrect, as the file is first searched in the directory containing the current documented file.

Searching the file in the "current directory" could be read as the
directory from which RDoc is run. This is incorrect, as the file is
first searched in the directory containing the current documented file.

Also this directory is searched before the `--include` directories.
@p8 p8 changed the title Improve documentation of include directive file search Improve documentation of :include: directive file search Jan 18, 2024
@nobu nobu changed the title Improve documentation of :include: directive file search [DOC] Improve documentation of :include: directive file search Mar 9, 2024
@nobu nobu merged commit aa2d98e into ruby:master Mar 9, 2024
24 checks passed
@p8 p8 deleted the docs/improve-include-directive-documentation branch March 9, 2024 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants