summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-31 06:48:35 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-01-31 06:48:35 +0000
commit1672df18704da19c8abfa5c544de37790d1da19a (patch)
treed411ddd6b39a11392d3b223bfe9c89ca57a75cd7
parentb0a18f4d9fb6125549776fe29a188e749a0a8073 (diff)
downloadbundler-1672df18704da19c8abfa5c544de37790d1da19a.tar.gz
* lib/rdoc/ri/formatter.rb (output): add accessor.
* lib/rdoc/ri/display.rb (page): replace @formatter.output instead of $stdout. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15357 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog11
-rw-r--r--lib/rdoc/ri/display.rb6
-rw-r--r--lib/rdoc/ri/formatter.rb1
3 files changed, 13 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index e5f95bbaf0..28b213dccb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,14 @@
+Thu Jan 31 15:46:30 2008 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * lib/rdoc/ri/formatter.rb (output): add accessor.
+
+ * lib/rdoc/ri/display.rb (page): replace @formatter.output instead of
+ $stdout.
+
Thu Jan 31 15:06:50 2008 NARUSE, Yui <naruse@ruby-lang.org>
- * marshal.c (r_object0): call r_entry/r_leave to call proc when TYPE_FIXNUM,
- TYPE_NIL, TYPE_TRUE, TYPE_FALSE, TYPE_SYMBOL.
+ * marshal.c (r_object0): call r_entry/r_leave to call proc when
+ TYPE_FIXNUM, TYPE_NIL, TYPE_TRUE, TYPE_FALSE, TYPE_SYMBOL.
Thu Jan 31 14:03:38 2008 NAKAMURA Usaku <usa@ruby-lang.org>
diff --git a/lib/rdoc/ri/display.rb b/lib/rdoc/ri/display.rb
index 3b24ef04ba..fa331c46c2 100644
--- a/lib/rdoc/ri/display.rb
+++ b/lib/rdoc/ri/display.rb
@@ -177,11 +177,11 @@ class RDoc::RI::DefaultDisplay
def page
if pager = setup_pager then
begin
- orig_stdout = $stdout
- $stdout = pager
+ orig_output = @formatter.output
+ @formatter.output = pager
yield
ensure
- $stdout = orig_stdout
+ @formatter.output = orig_output
pager.close
end
else
diff --git a/lib/rdoc/ri/formatter.rb b/lib/rdoc/ri/formatter.rb
index 14327fb4a8..d88cef1e3c 100644
--- a/lib/rdoc/ri/formatter.rb
+++ b/lib/rdoc/ri/formatter.rb
@@ -4,6 +4,7 @@ require 'rdoc/markup'
class RDoc::RI::Formatter
attr_reader :indent
+ attr_accessor :output
FORMATTERS = { }