Check if gem name
version version
is installed.
return the stub script text used to launch the true Ruby
script
Expire memoized instance variables that can incorrectly generate, replace or miss files due changes in certain attributes used to compute them.
Shows the context around code provided by “falling” indentation
Converts:
it "foo" do
into:
class OH def hello it "foo" do end end
Helper method for grabbing elements from document
Like ‘take_while` except when it stops iterating, it also returns the line that caused it to stop
Iterates over strongly connected component in the subgraph reachable from node.
Return value is unspecified.
each_strongly_connected_component_from
doesn’t call tsort_each_node
.
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=>[]}) graph.each_strongly_connected_component_from(2) {|scc| p scc } #=> [4] # [2] graph = G.new({1=>[2], 2=>[3, 4], 3=>[2], 4=>[]}) graph.each_strongly_connected_component_from(2) {|scc| p scc } #=> [4] # [2, 3]
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]
Fetch the trailing comments of the value.
Configure the trailing comments field for this repository and return self.
Build a diagnostic from the given prism parse warning.
Returns true if there is a comma between the two locations.
returns the directory nesting of the extension, ignoring the first part, so “ext/foo/bar/Cargo.toml” becomes “foo/bar”
@foo &&= bar
becomes
@foo && @foo = bar
@foo ||= bar
becomes
@foo || @foo = bar
@foo += bar
becomes
@foo = @foo + bar
Search through all unresolved deps and sub-dependencies and return specs that contain the file matching path
.
Return current keep_script_lines
status. Now it only returns true
of false
, but it can return other objects in future.
Note that this is an API for ruby internal use, debugging, and research. Do not use this for any other purpose. The compatibility is not guaranteed.
It set keep_script_lines
flag. If the flag is set, all loaded scripts are recorded in a interpreter process.
Note that this is an API for ruby internal use, debugging, and research. Do not use this for any other purpose. The compatibility is not guaranteed.