diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-31 06:48:35 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-31 06:48:35 +0000 |
commit | 1672df18704da19c8abfa5c544de37790d1da19a (patch) | |
tree | d411ddd6b39a11392d3b223bfe9c89ca57a75cd7 | |
parent | b0a18f4d9fb6125549776fe29a188e749a0a8073 (diff) | |
download | bundler-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-- | ChangeLog | 11 | ||||
-rw-r--r-- | lib/rdoc/ri/display.rb | 6 | ||||
-rw-r--r-- | lib/rdoc/ri/formatter.rb | 1 |
3 files changed, 13 insertions, 5 deletions
@@ -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 = { } |