Skip to content
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

Parsing documentation for WinRM fails #705

Closed
Ana06 opened this issue Mar 1, 2019 · 0 comments
Closed

Parsing documentation for WinRM fails #705

Ana06 opened this issue Mar 1, 2019 · 0 comments

Comments

@Ana06
Copy link

Ana06 commented Mar 1, 2019

With Ruby 2.6, rdoc 6.1.0 and last version of WinRM

> ruby  -c lib/winrm/psrp/powershell_output_decoder.rb
Syntax OK
> sudo gem install winrm
Parsing documentation for winrm-2.3.1
Before reporting this, could you check that the file you're documenting
has proper syntax:

  /usr/bin/ruby.ruby2.6 -c lib/winrm/psrp/powershell_output_decoder.rb

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

The internal error was:

        (NoMethodError) undefined method `[]' for nil:NilClass

ERROR:  While executing gem ... (NoMethodError)
    undefined method `[]' for nil:NilClass
        /usr/lib64/ruby/2.6.0/rdoc/parser/ripper_state_lex.rb:496:in `heredoc_end?'
        /usr/lib64/ruby/2.6.0/rdoc/parser/ripper_state_lex.rb:473:in `get_heredoc_tk'
        /usr/lib64/ruby/2.6.0/rdoc/parser/ripper_state_lex.rb:346:in `get_squashed_tk'
        /usr/lib64/ruby/2.6.0/rdoc/parser/ripper_state_lex.rb:578:in `parse'
        /usr/lib64/ruby/2.6.0/rdoc/parser/ruby.rb:180:in `initialize'
        /usr/lib64/ruby/2.6.0/rdoc/parser.rb:191:in `new'
        /usr/lib64/ruby/2.6.0/rdoc/parser.rb:191:in `for'
        /usr/lib64/ruby/2.6.0/rdoc/rdoc.rb:360:in `parse_file'
        /usr/lib64/ruby/2.6.0/rdoc/rdoc.rb:416:in `block in parse_files'
        /usr/lib64/ruby/2.6.0/rdoc/rdoc.rb:414:in `map'
        /usr/lib64/ruby/2.6.0/rdoc/rdoc.rb:414:in `parse_files'
        /usr/lib64/ruby/2.6.0/rdoc/rubygems_hook.rb:190:in `block in generate'
        /usr/lib64/ruby/2.6.0/rdoc/rubygems_hook.rb:189:in `chdir'
        /usr/lib64/ruby/2.6.0/rdoc/rubygems_hook.rb:189:in `generate'
        /usr/lib64/ruby/2.6.0/rdoc/rubygems_hook.rb:56:in `block in generation_hook'
        /usr/lib64/ruby/2.6.0/rdoc/rubygems_hook.rb:55:in `each'
        /usr/lib64/ruby/2.6.0/rdoc/rubygems_hook.rb:55:in `generation_hook'
        /usr/lib64/ruby/2.6.0/rubygems/request_set.rb:323:in `block in install_hooks'
        /usr/lib64/ruby/2.6.0/rubygems/request_set.rb:322:in `each'
        /usr/lib64/ruby/2.6.0/rubygems/request_set.rb:322:in `install_hooks'
        /usr/lib64/ruby/2.6.0/rubygems/request_set.rb:221:in `install'
        /usr/lib64/ruby/2.6.0/rubygems/commands/install_command.rb:212:in `install_gem'
        /usr/lib64/ruby/2.6.0/rubygems/commands/install_command.rb:264:in `block in install_gems'
        /usr/lib64/ruby/2.6.0/rubygems/commands/install_command.rb:258:in `each'
        /usr/lib64/ruby/2.6.0/rubygems/commands/install_command.rb:258:in `install_gems'
        /usr/lib64/ruby/2.6.0/rubygems/commands/install_command.rb:165:in `execute'
        /usr/lib64/ruby/2.6.0/rubygems/command.rb:321:in `invoke_with_build_args'
        /usr/lib64/ruby/2.6.0/rubygems/command_manager.rb:176:in `process_args'
        /usr/lib64/ruby/2.6.0/rubygems/command_manager.rb:146:in `run'
        /usr/lib64/ruby/2.6.0/rubygems/gem_runner.rb:59:in `run'
        /usr/bin/gem:21:in `<main>'
> sudo gem install winrm --no-document
Successfully installed winrm-2.3.1
1 gem installed

It seems related to #697 and #694

matzbot pushed a commit to ruby/ruby that referenced this issue Jun 7, 2019
* lib/rdoc/parser/ripper_state_lex.rb (RDoc::Parser::RipperStateLex):
  chomp newline, including CR, from here document terminator.

Closes: ruby/rdoc#694
Closes: ruby/rdoc#697
Closes: ruby/rdoc#705
@aycabta aycabta closed this as completed Jun 7, 2019
aycabta pushed a commit that referenced this issue Jun 7, 2019
* lib/rdoc/parser/ripper_state_lex.rb (RDoc::Parser::RipperStateLex):
  chomp newline, including CR, from here document terminator.

Closes: #694
Closes: #697
Closes: #705
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants