Skip to content

RDoc::Parser::Ruby failure on class paths with line breaks #745

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

Closed
driskell opened this issue Sep 18, 2019 · 0 comments · Fixed by #754
Closed

RDoc::Parser::Ruby failure on class paths with line breaks #745

driskell opened this issue Sep 18, 2019 · 0 comments · Fixed by #754

Comments

@driskell
Copy link

driskell commented Sep 18, 2019

The easiest reproducing case for this is:

print String::
  new('test')

This is valid Ruby. However, not for rdoc.

$ ruby test.rb
test
$ rdoc
Parsing sources...
100% [ 1/ 1]  test.rb
RDoc::Parser::Ruby failure around line 2 of
test.rb

  new('test')

Before reporting this, could you check that the file you're documenting
has proper syntax:

  /Users/Jason/.rvm/rubies/ruby-2.5.1/bin/ruby -c test.rb

RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.

The internal error was:

	(RDoc::Error) Invalid class or module definition: String

uh-oh! RDoc had a problem:
Invalid class or module definition: String

run with --debug for full backtrace

Versions:

$ ruby -v
ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin17]
$ rdoc --version
6.2.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant