summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--lib/pp.rb3
-rw-r--r--lib/tsort.rb5
3 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index eea775963..bb1c18bdc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/lib/pp.rb b/lib/pp.rb
index 0a18a6f31..1698084e6 100644
--- a/lib/pp.rb
+++ b/lib/pp.rb
@@ -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
diff --git a/lib/tsort.rb b/lib/tsort.rb
index 58e073dff..2c3c4b2c4 100644
--- a/lib/tsort.rb
+++ b/lib/tsort.rb
@@ -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