ALT Linux repos
Group :: Development/Ruby
RPM: ruby
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: ruby-1.9.2-alt-correct-less-invocation-AND-pager-selection.patch
Download
Download
diff --git a/lib/rdoc/ri/driver.rb b/lib/rdoc/ri/driver.rb
index 90fbc7c..f2a9bee 100644
--- a/lib/rdoc/ri/driver.rb
+++ b/lib/rdoc/ri/driver.rb
@@ -1031,10 +1031,16 @@ Options may also be set in the 'RI' environment variable.
def setup_pager
return if @use_stdout
- pagers = [ENV['RI_PAGER'], ENV['PAGER'], 'pager', 'less', 'more']
+ pagers = [ENV['RI_PAGER'], ENV['PAGER'], 'pager', 'less -R', 'more']
pagers.compact.uniq.each do |pager|
- next unless File.exist? pager
+ command = pager.split(/\s+/).first
+ exist = File.exist? command
+ ENV['PATH'].split(File::PATH_SEPARATOR).each do |path|
+ exist = File.exist?(File.join(path, command))
+ break if exist
+ end unless command === /\//
+ next unless exist
io = IO.popen pager, "w" rescue next