* lib/pp.rb (pp): return nil like p.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2002-03-25 18:24:46 +00:00
parent c4af72cd46
commit 4795daf1bc
3 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,7 @@
Tue Mar 26 03:23:50 2002 Tanaka Akira <akr@m17n.org>
* lib/pp.rb (pp): return nil like p.
Tue Mar 26 01:48:01 2002 Akinori MUSHA <knu@iDaemons.org>
* ext/bigfloat/extconf.rb: Downcase the module name. (BigFloat.so

View File

@ -55,6 +55,8 @@ I like the latter. If you do too, this library is for you.
: pp(obj)
output ((|obj|)) to (({$>})) in pretty printed format.
It returns (({nil})).
== Customized output
To define your customized pretty printing function for your class,
redefine a method (({pretty_print(((|pp|)))})) in the class.
@ -110,6 +112,7 @@ module Kernel
objs.each {|obj|
PP.pp(obj)
}
nil
end
end

View File

@ -55,7 +55,7 @@ TSort uses Hash internally.
--- strongly_connected_components
returns strongly connected components as an array of array of nodes.
The array is sorted as children to parents.
The array is sorted from children to parents.
Each elements of the array represents a strongly connected component.
--- each_strongly_connected_component {|nodes| ...}
@ -114,7 +114,8 @@ Very simple `make' like tool can be implemented as follows:
outputs_time = nil
end
if outputs_time == nil ||
inputs_time != nil && outputs_time < inputs_time # `<=' is better?
inputs_time != nil && outputs_time <= inputs_time
sleep 1 if inputs_time != nil && inputs_time.to_i == Time.now.to_i
block.call
end
end