IRB "help" command fails with an exception

Bug #877838 reported by ifireball
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ruby1.8 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

When trying to use the "help" command in IRB, it fails with the following exception:

NameError: undefined method `execute' for module `IRB::ExtendCommand::Help'
 from (eval):4:in `instance_method'
 from (eval):4:in `help'
 from (irb):1
 from /usr/lib/ruby/1.8/rubygems.rb:983

This problem also exists in the upstream [ruby-core:22310] but a fix was committed to the 1.9 branch in July 21, 2009, the following patch backports it to this version:
(Patch against "/usr/lib/ruby/1.8/irb/cmd/help.rb")

*** /usr/lib/ruby/1.8/irb/cmd/help.rb.orig 2011-10-19 02:53:47.000000000 +0200
--- /usr/lib/ruby/1.8/irb/cmd/help.rb 2011-10-19 03:01:54.000000000 +0200
***************
*** 9,27 ****
  #
  #

  require 'rdoc/ri/ri_driver'

  module IRB
    module ExtendCommand
! module Help
        begin
! @ri = RiDriver.new
        rescue SystemExit
        else
! def self.execute(context, *names)
            names.each do |name|
              begin
! @ri.get_info_for(name.to_s)
              rescue RiError
                puts $!.message
              end
--- 9,28 ----
  #
  #

+ require "irb/cmd/nop.rb"
  require 'rdoc/ri/ri_driver'

  module IRB
    module ExtendCommand
! class Help<Nop
        begin
! Ri = RiDriver.new
        rescue SystemExit
        else
! def execute(*names)
            names.each do |name|
              begin
! Ri.get_info_for(name.to_s)
              rescue RiError
                puts $!.message
              end

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ruby1.8 (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.