class RDoc::RI::Driver
def setup_pager
def setup_pager return if @use_stdout pagers = [ENV['RI_PAGER'], ENV['PAGER'], 'pager', 'less', 'more'] pagers.compact.uniq.each do |pager| pager_cmd = pager.split.first next unless in_path? pager_cmd io = IO.popen(pager, 'w') rescue next next if $? and $?.exited? # pager didn't work @paging = true return io end @use_stdout = true nil end