rdoc icon indicating copy to clipboard operation
rdoc copied to clipboard

"Missing terminating ... for string" when code validates with ruby -c

Open bmedici opened this issue 9 years ago • 3 comments

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 !

bmedici avatar Feb 21 '17 13:02 bmedici

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

jcollonville avatar Sep 04 '17 08:09 jcollonville

OK, I checked that rest-ftp-daemon 1.0.5 crashes RDoc 5.1.0, but it's fixed at HEAD of master branch.

aycabta avatar Oct 06 '17 07:10 aycabta

@bmedici Please wait for RDoc 6.0.0, it's released soon.

aycabta avatar Oct 06 '17 07:10 aycabta