Skip to content

Ruby 4 - Building failure on RDoc generation #1564

@rainerborene

Description

@rainerborene

I've tried to install ruby locally using asdf:

$ asdf install ruby 4.0.0

Here is the stack trace:

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

  /home/user/.asdf/installs/ruby/4.0.0/bin/ruby -c lib/rubygems.rb

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

The internal error was:

        (TypeError) can't create instance of singleton class

/tmp/ruby-build.20260114000254.815854.Dk6xLt/ruby-4.0.0/.bundle/gems/rdoc-7.0.3/lib/rdoc/parser/ripper_state_lex.rb:23:in 'RDoc::Parser::RipperStateLex::InnerStateLex#on_default': can't create instance of singleton class (TypeError)
        from /tmp/ruby-build.20260114000254.815854.Dk6xLt/ruby-4.0.0/.ext/common/ripper/filter.rb:66:in 'block in Ripper::Filter#parse'
        from /tmp/ruby-build.20260114000254.815854.Dk6xLt/ruby-4.0.0/.ext/common/ripper/filter.rb:61:in 'Array#each'
        from /tmp/ruby-build.20260114000254.815854.Dk6xLt/ruby-4.0.0/.ext/common/ripper/filter.rb:61:in 'Ripper::Filter#parse'
        from /tmp/ruby-build.20260114000254.815854.Dk6xLt/ruby-4.0.0/.bundle/gems/rdoc-7.0.3/lib/rdoc/parser/ripper_state_lex.rb:282:in 'RDoc::Parser::RipperStateLex#initialize'
        from /tmp/ruby-build.20260114000254.815854.Dk6xLt/ruby-4.0.0/.bundle/gems/rdoc-7.0.3/lib/rdoc/parser/ripper_state_lex.rb:287:in 'RDoc::Parser::RipperStateLex.parse'
        from /tmp/ruby-build.20260114000254.815854.Dk6xLt/ruby-4.0.0/.bundle/gems/rdoc-7.0.3/lib/rdoc/parser/ruby.rb:181:in 'RDoc::Parser::Ruby#initialize'
        from /tmp/ruby-build.20260114000254.815854.Dk6xLt/ruby-4.0.0/.bundle/gems/rdoc-7.0.3/lib/rdoc/parser.rb:194:in 'RDoc::Parser.for'
        from /tmp/ruby-build.20260114000254.815854.Dk6xLt/ruby-4.0.0/.bundle/gems/rdoc-7.0.3/lib/rdoc/rdoc.rb:350:in 'RDoc::RDoc#parse_file'
        from /tmp/ruby-build.20260114000254.815854.Dk6xLt/ruby-4.0.0/.bundle/gems/rdoc-7.0.3/lib/rdoc/rdoc.rb:406:in 'block in RDoc::RDoc#parse_files'
        from /tmp/ruby-build.20260114000254.815854.Dk6xLt/ruby-4.0.0/.bundle/gems/rdoc-7.0.3/lib/rdoc/rdoc.rb:404:in 'Array#map'
        from /tmp/ruby-build.20260114000254.815854.Dk6xLt/ruby-4.0.0/.bundle/gems/rdoc-7.0.3/lib/rdoc/rdoc.rb:404:in 'RDoc::RDoc#parse_files'
        from /tmp/ruby-build.20260114000254.815854.Dk6xLt/ruby-4.0.0/.bundle/gems/rdoc-7.0.3/lib/rdoc/rdoc.rb:467:in 'RDoc::RDoc#document'
        from ./tool/rdoc-srcdir:28:in '<main>'

If you need the entire build log, here it is: https://gist.github.com/rainerborene/b154a9943edc3ba93026def0fbc26040

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions