Bug #3992

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

Added by Heesob Park over 3 years ago. Updated almost 3 years ago.

[ruby-core:32925]
Status:Rejected
Priority:Normal
Assignee:Keiju Ishitsuka
Category:lib
Target version:1.9.3
ruby -v:ruby 1.9.3dev (2010-10-28 trunk 29615) [i386-mswin32_90] Backport:

Description

=begin
On Rubyinstaller 1.9.2p0:

C:>irb
irb(main):001:0> help String
NoMethodError: undefined method `getinfofor' 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

nput'
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 evalinput'
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.

String
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\CompaqOwner>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
irbbinding'
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 evalinput'
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
= 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.
=end


Related issues

Duplicates ruby-trunk - Bug #3760: help "String.new" (for example) no longer works in irb Closed 08/29/2010

History

#1 Updated by Heesob Park over 3 years ago

=begin

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
+++ help.rb.new 2010-10-28 12:11:12.000000000 +0900
@@ -26,7 +26,7 @@
end
names.each do |name|
begin
- Ri.getinfofor(name.tos)
+ Ri.display
name(name.to_s)
rescue RDoc::RI::Error
puts $!.message
end

--- driver.rb 2010-10-28 12:12:24.000000000 +0900
+++ driver.rb.new 2010-10-28 12:11:40.000000000 +0900
@@ -828,7 +828,7 @@
Readline.readline ">> "
else
print ">> "
- $stdin.gets
+ $stdin.gets.chomp
end

    return if name.nil? or name.empty?

=end

#2 Updated by Yui NARUSE over 3 years ago

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

=begin

=end

#3 Updated by Run Paint Run Run over 3 years ago

=begin
This duplicates #3760, which also has a patch.
=end

#4 Updated by Yui NARUSE over 3 years ago

  • Status changed from Assigned to Rejected

=begin
No feedback.
=end

#5 Updated by Heesob Park over 3 years ago

=begin
What feedback?
=end

Also available in: Atom PDF