docs(README): fix the example that doesn't work#1325
Closed
okuramasafumi wants to merge 1 commit intoruby:masterfrom
Closed
docs(README): fix the example that doesn't work#1325okuramasafumi wants to merge 1 commit intoruby:masterfrom
okuramasafumi wants to merge 1 commit intoruby:masterfrom
Conversation
```ruby RDoc::RDoc.new.document(RDoc::Options.new) ``` fails with the following error: ``` /Users/okuramasafumi/.rbenv/versions/3.4.1/lib/ruby/gems/3.4.0/gems/rdoc-6.12.0/lib/rdoc/options.rb:522:in 'RDoc::Options#check_files': undefined method 'delete_if' for nil (NoMethodError) ``` I think this should be fixed, but for now modifying an example might be enough.
Member
|
If you think this should be fixed, which I agree, can you make a PR to address the root problem instead? It should be a rather straightforward one |
Member
|
The failure is because some required setups for I think |
Contributor
Author
tompng
reviewed
Mar 24, 2025
|
|
||
| rdoc = RDoc::RDoc.new | ||
| rdoc.document options | ||
| rdoc.document([]) # This generates documentation for all files in the current directory |
Member
There was a problem hiding this comment.
How about this?
options = RDoc::Options.new
options.files = ['./a.rb', './b.rb']
options.setup_generator 'darkfish'
# see RDoc::Options for more setups
rdoc = RDoc::RDoc.new
rdoc.document optionsSome example of options setups are in TestRDocRDoc#test_document
tompng
added a commit
that referenced
this pull request
Apr 3, 2025
Add minimal option setup(options.files and options.generator) to make the example code work. #1325 (comment)
Member
|
README fixed in #1337 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fails with the following error:
I think this should be fixed, but for now modifying an example might be enough.