summaryrefslogtreecommitdiff
path: root/lib/irb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/irb')
-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 e1f47e2c97..1e600a6cd2 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