ruby / ruby/rdoc

RDoc::RDoc #parse_file does not work

Open
#1,268 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
930
Forks
465
Avg merge
3d 10h
Merged PRs (30d)
27

Description

Parse files works correctly:

rdoc = RDoc::RDoc.new
rdoc.options = RDoc::Options.load_options
rdoc.store = RDoc::Store.new

rdoc.parse_files(['/path/to/file'])

However when calling parse file instead,

rdoc.parse_file('path/to/file')

I see a failure for stats being nil.

undefined method `add_file' for nil (NoMethodError)

    @stats.add_file filename
          ^^^^^^^^^

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the RDoc::RDoc#parse_file entry point and compare its setup with the working RDoc::RDoc#parse_files example. Reproduce the reported NoMethodError, then verify that calling parse_file with the shown RDoc setup no longer fails because stats is nil.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
documentation
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.