rdoc
rdoc copied to clipboard
"Missing terminating ... for string" when code validates with ruby -c
Hi,
While installing a gem of my project today, RDoc complains
$ gem install rest-ftp-daemon
[...]
Parsing documentation for rest-ftp-daemon-1.0.5
RDoc::Parser::Ruby failure around line 158 of
lib/rest-ftp-daemon/helpers/views.rb
" end\n\n\n end\nend\n"
Before reporting this, could you check that the file you're documenting
has proper syntax:
/home/bruno/.rbenv/versions/2.3.0/bin/ruby -c lib/rest-ftp-daemon/helpers/views.rb
RDoc is not a full Ruby parser and will fail when fed invalid ruby programs.
The internal error was:
(RDoc::RubyLex::Error) Missing terminating <span class="transfer-prefix label label-xs label-simple"> for string
ERROR: While executing gem ... (RDoc::RubyLex::Error)
Missing terminating <span class="transfer-prefix label label-xs label-simple"> for string
When validating the code file like suggested, visually and with ruby -c, everything looks good:
$ cd ~/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/rest-ftp-daemon-1.0.5
$ /home/bruno/.rbenv/versions/2.3.0/bin/ruby -c lib/rest-ftp-daemon/helpers/views.rb
Syntax OK
Any idea what could cause this RDoc message ?
Thanks !
For those who run into the similar problem I just found that this syntax is causing the issue :
str <<"test" (no space between << and "test")
str << "test" solves the issue
OK, I checked that rest-ftp-daemon 1.0.5 crashes RDoc 5.1.0, but it's fixed at HEAD of master branch.
@bmedici Please wait for RDoc 6.0.0, it's released soon.