The number of paths in the +$LOAD_PATH+ from activated gems. Used to prioritize -I
and ENV['RUBYLIB']
entries during require
.
Returns strongly connected components as an array of arrays of nodes. The array is sorted from children to parents. Each elements of the array represents a strongly connected component.
class G include TSort def initialize(g) @g = g end def tsort_each_child(n, &b) @g[n].each(&b) end def tsort_each_node(&b) @g.each_key(&b) end end graph = G.new({1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]}) p graph.strongly_connected_components #=> [[4], [2], [3], [1]] graph = G.new({1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}) p graph.strongly_connected_components #=> [[4], [2, 3], [1]]
Returns strongly connected components as an array of arrays of nodes. The array is sorted from children to parents. Each elements of the array represents a strongly connected component.
The graph is represented by each_node and each_child. each_node should have call
method which yields for each node in the graph. each_child should have call
method which takes a node argument and yields for each child node.
g = {1=>[2, 3], 2=>[4], 3=>[2, 4], 4=>[]} each_node = lambda {|&b| g.each_key(&b) } each_child = lambda {|n, &b| g[n].each(&b) } p TSort.strongly_connected_components(each_node, each_child) #=> [[4], [2], [3], [1]] g = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]} each_node = lambda {|&b| g.each_key(&b) } each_child = lambda {|n, &b| g[n].each(&b) } p TSort.strongly_connected_components(each_node, each_child) #=> [[4], [2, 3], [1]]
Waits up to the continue timeout for a response from the server provided we’re speaking HTTP 1.1 and are expecting a 100-continue response.
Checks the permissions of the credentials file. If they are not 0600 an error message is displayed and RubyGems aborts.
Implementation for Specification#validate_for_resolution
Add the –key option
Add the –otp option
Default options for the gem install and update commands.
Add the –http-proxy option
Add the –source option
Add the –platform option to the option parser.
Add the –prerelease option to the option parser.
Returns location objects associated with the AST node. The returned array contains RubyVM::AbstractSyntaxTree::Location
.
Gets various OpenSSL options.