aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tsort.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-25 18:24:46 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-03-25 18:24:46 +0000
commit4795daf1bce88cca8c3b14dc5c75a349838ee98a (patch)
tree435117aeb9991ed29d95333456ea504ca3563911 /lib/tsort.rb
parentc4af72cd46e468374362e9d78bd7f969e560bc62 (diff)
downloadruby-4795daf1bce88cca8c3b14dc5c75a349838ee98a.tar.gz
* 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
Diffstat (limited to 'lib/tsort.rb')
-rw-r--r--lib/tsort.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/tsort.rb b/lib/tsort.rb
index 58e073dff4..2c3c4b2c4e 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