1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
usa 2008-01-31 06:48:35 +00:00
parent b0a18f4d9f
commit 1672df1870
3 changed files with 13 additions and 5 deletions

View file

@ -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> 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, * marshal.c (r_object0): call r_entry/r_leave to call proc when
TYPE_NIL, TYPE_TRUE, TYPE_FALSE, TYPE_SYMBOL. TYPE_FIXNUM, TYPE_NIL, TYPE_TRUE, TYPE_FALSE, TYPE_SYMBOL.
Thu Jan 31 14:03:38 2008 NAKAMURA Usaku <usa@ruby-lang.org> Thu Jan 31 14:03:38 2008 NAKAMURA Usaku <usa@ruby-lang.org>

View file

@ -177,11 +177,11 @@ class RDoc::RI::DefaultDisplay
def page def page
if pager = setup_pager then if pager = setup_pager then
begin begin
orig_stdout = $stdout orig_output = @formatter.output
$stdout = pager @formatter.output = pager
yield yield
ensure ensure
$stdout = orig_stdout @formatter.output = orig_output
pager.close pager.close
end end
else else

View file

@ -4,6 +4,7 @@ require 'rdoc/markup'
class RDoc::RI::Formatter class RDoc::RI::Formatter
attr_reader :indent attr_reader :indent
attr_accessor :output
FORMATTERS = { } FORMATTERS = { }