Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-5615

ruby:3.1/rubygem-irb: IRB has hard dependency on rubygem-rdoc [RHEL 8]

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • rhel-8.10
    • rhel-8.9.0
    • ruby
    • None
    • None
    • ZStream
    • rhel-sst-pt-python-ruby-nodejs
    • ssg_core_services
    • 29
    • 32
    • 3
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • Approved Blocker
    • None
    • None
    • If docs needed, set a value
    • None

      Description of problem:
      The IRB console throws error when run without rubygem-rdoc installed.

      This is not correct, rubygem IRB should not have a hard dependency on RDoc.

      Version-Release number of selected component (if applicable):
      rubygem-irb-1.4.1-141.module+el8.7.0+15051+29b42f0c

      How reproducible:
      always

      Steps to Reproduce:
      1. dnf module enable ruby:3.1-y
      2. dnf --setopt=install_weak_deps=False install -y rubygem-irb
      (rubygem-rdoc gets pulled in via weak dependencies by default.)
      3. echo '' | irb
      ( ^ this allows for automated running in e.g. scripts.)

      Actual results:
      ~~~
      $ echo '' | irb
      <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require': cannot load such file – rdoc (LoadError)
      from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
      from /usr/share/gems/gems/irb-1.4.1/lib/irb/input-method.rb:17:in `<top (required)>'
      from /usr/share/gems/gems/irb-1.4.1/lib/irb/context.rb:14:in `require_relative'
      from /usr/share/gems/gems/irb-1.4.1/lib/irb/context.rb:14:in `<top (required)>'
      from /usr/share/gems/gems/irb-1.4.1/lib/irb.rb:16:in `require_relative'
      from /usr/share/gems/gems/irb-1.4.1/lib/irb.rb:16:in `<top (required)>'
      from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
      from <internal:/usr/share/rubygems/rubygems/core_ext/kernel_require.rb>:85:in `require'
      from /usr/share/gems/gems/irb-1.4.1/exe/irb:9:in `<top (required)>'
      from /usr/bin/irb:25:in `load'
      from /usr/bin/irb:25:in `<main>'
      ~~~

      Expected results:
      No error
      ~~~
      $ echo '' | irb
      Switch to inspect mode.

      ~~~

      Additional info:
      Reported upstream some while back https://github.com/ruby/irb/issues/342
      Upstream resolved via:
      https://github.com/ruby/irb/commit/54c8df06ff9e161012f89d19a4e3aa2e0e37e1b0
      https://github.com/ruby/irb/commit/b24852058fc87c940252c8a711c60ae2eb298082

      Fedora's Ruby 3.1 fixed it via these commit that include upstream changes to drop the hard dependency inside IRB:
      https://src.fedoraproject.org/rpms/ruby/c/3f106c188ea6368c950ba7d610594f910773a25f?branch=f37
      https://src.fedoraproject.org/rpms/ruby/c/bf921512e288965724353ecf73ca9aa6d4975489?branch=f37

              jprokop@redhat.com Jarek Prokop
              jprokop@redhat.com Jarek Prokop
              Jarek Prokop Jarek Prokop
              Lukas Zachar Lukas Zachar
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: