summaryrefslogtreecommitdiffstats
path: root/lib/irb/cmd/help.rb
diff options
context:
space:
mode:
authoryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-05 09:41:03 +0000
committeryugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-12-05 09:41:03 +0000
commitee4a86215934743c4b5fded774abbf069dbece2a (patch)
tree0d96104ec2f252e0da815d53674c7962cfccce0c /lib/irb/cmd/help.rb
parent0cea933bf19f1c7e04fbde4fb07928a81925dd10 (diff)
merges r24227 from trunk into ruby_1_9_1.
-- * lib/irb/cmd/help.rb: fixed irb's "help" command. [ruby-core:22310]. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_9_1@26019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/irb/cmd/help.rb')
-rw-r--r--lib/irb/cmd/help.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/irb/cmd/help.rb b/lib/irb/cmd/help.rb
index e1f47e2c9..1e600a6cd 100644
--- a/lib/irb/cmd/help.rb
+++ b/lib/irb/cmd/help.rb
@@ -11,17 +11,19 @@
require 'rdoc/ri/driver'
require 'rdoc/ri/util'
+require "irb/cmd/nop.rb"
+
module IRB
module ExtendCommand
- module Help
+ class Help<Nop
begin
- @ri = RDoc::RI::Driver.new
+ Ri = RDoc::RI::Driver.new
rescue SystemExit
else
- def self.execute(context, *names)
+ def execute(*names)
names.each do |name|
begin
- @ri.get_info_for(name.to_s)
+ Ri.get_info_for(name.to_s)
rescue RDoc::RI::Error
puts $!.message
end