Bug #3992


irb's "help" command errs in 1.9.x

Added by phasis68 (Heesob Park) over 11 years ago. Updated about 11 years ago.

Target version:
ruby -v:
ruby 1.9.3dev (2010-10-28 trunk 29615) [i386-mswin32_90]


On Rubyinstaller 1.9.2p0:

irb(main):001:0> help String
NoMethodError: undefined method `get_info_for' for #RDoc::RI::Driver:0x13f3ea8

     from c:/Ruby192/lib/ruby/1.9.1/irb/cmd/help.rb:29:in `block in execute'
     from c:/Ruby192/lib/ruby/1.9.1/irb/cmd/help.rb:27:in `each'
     from c:/Ruby192/lib/ruby/1.9.1/irb/cmd/help.rb:27:in `execute'
     from c:/Ruby192/lib/ruby/1.9.1/irb/cmd/nop.rb:19:in `execute'
     from c:/Ruby192/lib/ruby/1.9.1/irb/extend-command.rb:135:in `irb_help'
     from c:/Ruby192/lib/ruby/1.9.1/irb/extend-command.rb:138:in `irb_help'
     from (irb):1:in `irb_binding'
     from c:/Ruby192/lib/ruby/1.9.1/irb/workspace.rb:80:in `eval'
     from c:/Ruby192/lib/ruby/1.9.1/irb/workspace.rb:80:in `evaluate'
     from c:/Ruby192/lib/ruby/1.9.1/irb/context.rb:254:in `evaluate'
     from c:/Ruby192/lib/ruby/1.9.1/irb.rb:159:in `block (2 levels) in eval_i

from c:/Ruby192/lib/ruby/1.9.1/irb.rb:273:in signal_status' from c:/Ruby192/lib/ruby/1.9.1/irb.rb:156:in block in eval_input'
from c:/Ruby192/lib/ruby/1.9.1/irb/ruby-lex.rb:243:in block (2 levels)in each_top_level_statement' from c:/Ruby192/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in loop'
from c:/Ruby192/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in block in each_top_level_statement' from c:/Ruby192/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in catch'
from c:/Ruby192/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in each_top_level_statement' from c:/Ruby192/lib/ruby/1.9.1/irb.rb:155:in eval_input'
from c:/Ruby192/lib/ruby/1.9.1/irb.rb:70:in block in start' from c:/Ruby192/lib/ruby/1.9.1/irb.rb:69:in catch'
from c:/Ruby192/lib/ruby/1.9.1/irb.rb:69:in start' from c:/Ruby192/bin/irb:12:in 'Maybe IRB bug!!

irb(main):002:0> help

Enter the method name you want to look up.
You can use tab to autocomplete.
Enter a blank line to exit.

RDoc::RI::Driver::NotFoundError: String
from c:/Ruby192/lib/ruby/1.9.1/rdoc/ri/driver.rb:730:in block in expand_class' from c:/Ruby192/lib/ruby/1.9.1/rdoc/ri/driver.rb:718:in each'
from c:/Ruby192/lib/ruby/1.9.1/rdoc/ri/driver.rb:718:in inject' from c:/Ruby192/lib/ruby/1.9.1/rdoc/ri/driver.rb:718:in expand_class'
from c:/Ruby192/lib/ruby/1.9.1/rdoc/ri/driver.rb:745:in expand_name' from c:/Ruby192/lib/ruby/1.9.1/rdoc/ri/driver.rb:831:in block in interactive'
from c:/Ruby192/lib/ruby/1.9.1/rdoc/ri/driver.rb:821:in loop' from c:/Ruby192/lib/ruby/1.9.1/rdoc/ri/driver.rb:821:in interactive'
from (irb):6
from c:/Ruby192/bin/irb:12:in `'

I guess ruby installer 1.9.2 do not include rdoc.

On 1.9.3dev trunk:

C:\Documents and Settings\Compaq_Owner>irb
irb(main):001:0> help String
NoMethodError: undefined method get_info_for' for #<RDoc::RI::Driver:0xf61e04> from c:/usr/lib/ruby/1.9.1/irb/cmd/help.rb:29:in block in execute'
from c:/usr/lib/ruby/1.9.1/irb/cmd/help.rb:27:in each' from c:/usr/lib/ruby/1.9.1/irb/cmd/help.rb:27:in execute'
from c:/usr/lib/ruby/1.9.1/irb/cmd/nop.rb:19:in execute' from c:/usr/lib/ruby/1.9.1/irb/extend-command.rb:135:in irb_help'
from c:/usr/lib/ruby/1.9.1/irb/extend-command.rb:138:in irb_help' from (irb):1:in irb_binding'
from c:/usr/lib/ruby/1.9.1/irb/workspace.rb:80:in eval' from c:/usr/lib/ruby/1.9.1/irb/workspace.rb:80:in evaluate'
from c:/usr/lib/ruby/1.9.1/irb/context.rb:254:in evaluate' from c:/usr/lib/ruby/1.9.1/irb.rb:159:in block (2 levels) in eval_input'
from c:/usr/lib/ruby/1.9.1/irb.rb:273:in signal_status' from c:/usr/lib/ruby/1.9.1/irb.rb:156:in block in eval_input'
from c:/usr/lib/ruby/1.9.1/irb/ruby-lex.rb:243:in block (2 levels) in each_top_level_statement' from c:/usr/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in loop'
from c:/usr/lib/ruby/1.9.1/irb/ruby-lex.rb:229:in block in each_top_level_statement' from c:/usr/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in catch'
from c:/usr/lib/ruby/1.9.1/irb/ruby-lex.rb:228:in each_top_level_statement' from c:/usr/lib/ruby/1.9.1/irb.rb:155:in eval_input'
from c:/usr/lib/ruby/1.9.1/irb.rb:70:in block in start' from c:/usr/lib/ruby/1.9.1/irb.rb:69:in catch'
from c:/usr/lib/ruby/1.9.1/irb.rb:69:in start' from c:/usr/bin/irb.bat:20:in 'Maybe IRB bug!

irb(main):002:0> help

Enter the method name you want to look up.
Enter a blank line to exit.

= String < Object

= Includes:
Comparable (from ruby core)

(from ruby core)

A String object holds and manipulates an arbitrary sequence of bytes,
typically representing characters. String objects may be created using
String::new or as literals.

Because of aliasing issues, users of strings should be aware of the methods
that modify the contents of a String object. Typically, methods with names
ending in !'' modify their receiver, while those without a !'' return a
new String. However, there are exceptions, such as String#[]=.

irb(main):003:0> help

Enter the method name you want to look up.
Enter a blank line to exit.

Besides, I cannot exit from help mode on 1.9.3dev trunk version.

Related issues 1 (0 open1 closed)

Is duplicate of Ruby master - Bug #3760: help "" (for example) no longer works in irbClosedkeiju (Keiju Ishitsuka)08/29/2010Actions
Actions #1

Updated by phasis68 (Heesob Park) over 11 years ago


Here is patch for the trunk
lib/irb/cmd/help.rb and lib/rdoc/ri/driver.rb

--- help.rb 2010-10-28 12:12:35.000000000 +0900
+++ 2010-10-28 12:11:12.000000000 +0900
@@ -26,7 +26,7 @@
names.each do |name|

  •          Ri.get_info_for(name.to_s)
  •          Ri.display_name(name.to_s)
           rescue RDoc::RI::Error
             puts $!.message

--- driver.rb 2010-10-28 12:12:24.000000000 +0900
+++ 2010-10-28 12:11:40.000000000 +0900
@@ -828,7 +828,7 @@
Readline.readline ">> "
print ">> "

  •           $stdin.gets
  •           $stdin.gets.chomp
     return if name.nil? or name.empty?


Actions #2

Updated by naruse (Yui NARUSE) over 11 years ago

  • Status changed from Open to Assigned
  • Assignee set to keiju (Keiju Ishitsuka)
  • Target version changed from 2.0.0 to 1.9.3



Actions #3

Updated by runpaint (Run Paint Run Run) over 11 years ago

This duplicates #3760, which also has a patch.

Actions #4

Updated by naruse (Yui NARUSE) over 11 years ago

  • Status changed from Assigned to Rejected

No feedback.

Actions #5

Updated by phasis68 (Heesob Park) over 11 years ago

What feedback?


Also available in: Atom PDF