Permalink
Browse files

Better fix for JRUBY-4231: [regression] ri is broken

It doesn't require stdlib patching and works for both 1.8 and 1.9.
  • Loading branch information...
1 parent 547dce2 commit e3290fdb4e72c6f5e11e501e8a1f5d6dc172f1fc @vvs vvs committed Jan 4, 2010
Showing with 4 additions and 2 deletions.
  1. +3 −0 bin/ri
  2. +1 −2 lib/ruby/1.8/rdoc/ri/ri_options.rb
View
@@ -39,6 +39,9 @@
# it to the next release.
#
+# JRUBY-3413 and JRUBY-4231
+ARGV << "--no-pager"
+
begin
# Ruby 1.8 mode
require 'rdoc/ri/ri_driver'
@@ -223,8 +223,7 @@ def show_version
end
def initialize
- # JRUBY-3413: ri/rdoc do not page correctly (also JRUBY-4231)
- @use_stdout = true
+ @use_stdout = !STDOUT.tty?
@width = 72
@formatter = RI::TextFormatter.for("plain")
@list_classes = false

0 comments on commit e3290fd

Please sign in to comment.