Results for: "Array.new"

Iterates over strongly connected components in a graph. The graph is represented by node and each_child.

node is the first node. each_child should have call method which takes a node argument and yields for each child node.

Return value is unspecified.

TSort.each_strongly_connected_component_from is a class method and it doesn’t need a class to represent a graph which includes TSort.

graph = {1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}
each_child = lambda {|n, &b| graph[n].each(&b) }
TSort.each_strongly_connected_component_from(1, each_child) {|scc|
  p scc
}
#=> [4]
#   [2, 3]
#   [1]

Example:

x.foo = 1
        ^
x[42] = 1
  ^^^^^^^
x[] = 1
  ^^^^^

Compile a BlockParameterNode node

Compile a BlockParametersNode node

Compile a ForwardingArgumentsNode node

Compile a NumberedParametersNode node

Compile a OptionalParameterNode node

Compile a PinnedVariableNode node

Compile a RequiredParameterNode node

Compile a RestParameterNode node

Desugar ‘x += y` to `x = x + y`

Dispatch enter and leave events for BlockParameterNode nodes and continue walking the tree.

Dispatch enter and leave events for BlockParametersNode nodes and continue walking the tree.

Dispatch enter and leave events for ForwardingArgumentsNode nodes and continue walking the tree.

Dispatch enter and leave events for NumberedParametersNode nodes and continue walking the tree.

Dispatch enter and leave events for OptionalParameterNode nodes and continue walking the tree.

Dispatch enter and leave events for PinnedVariableNode nodes and continue walking the tree.

Dispatch enter and leave events for RequiredParameterNode nodes and continue walking the tree.

Dispatch enter and leave events for RestParameterNode nodes and continue walking the tree.

Copy a BlockParameterNode node

Copy a BlockParametersNode node

Copy a ForwardingArgumentsNode node

Copy a NumberedParametersNode node

Copy a OptionalParameterNode node

Copy a PinnedVariableNode node

Search took: 6ms  ·  Total Results: 3047