1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/irb] Pass RI options to help

https://github.com/ruby/irb/commit/9b98d1afab
This commit is contained in:
Filip Pyda 2021-07-16 10:35:00 +02:00 committed by git
parent 97a569c648
commit be5159c2f8

View file

@ -17,7 +17,8 @@ module IRB
class Help < Nop
def execute(*names)
require 'rdoc/ri/driver'
IRB::ExtendCommand::Help.const_set(:Ri, RDoc::RI::Driver.new)
opts = RDoc::RI::Driver.process_args([])
IRB::ExtendCommand::Help.const_set(:Ri, RDoc::RI::Driver.new(opts))
rescue LoadError, SystemExit
IRB::ExtendCommand::Help.remove_method(:execute)
# raise NoMethodError in ensure