The LockSpecification
comes from a lockfile (Gem::RequestSet::Lockfile
).
A LockSpecification’s dependency information is pre-filled from the lockfile.
The local source finds gems in the current directory for fulfilling dependencies.
A Lock
source wraps an installed gem’s source and sorts before other sources during dependency resolution. This allows RubyGems to prefer gems from dependency lock files.
Shows surrounding kw/end pairs
The purpose of showing these extra pairs is due to cases of ambiguity when only one visible line is matched.
For example:
1 class Dog 2 def bark 4 def eat 5 end 6 end
In this case either line 2 could be missing an ‘end` or line 4 was an extra line added by mistake (it happens).
When we detect the above problem it shows the issue as only being on line 2
2 def bark
Showing “neighbor” keyword pairs gives extra context:
2 def bark 4 def eat 5 end
Example:
lines = BeforeAfterKeywordEnds.new( block: block, code_lines: code_lines ).call()
An object representation of a stack frame, initialized by Kernel#caller_locations
.
For example:
# caller_locations.rb def a(skip) caller_locations(skip) end def b(skip) a(skip) end def c(skip) b(skip) end c(0..2).map do |call| puts call.to_s end
Running ruby caller_locations.rb
will produce:
caller_locations.rb:2:in `a' caller_locations.rb:5:in `b' caller_locations.rb:8:in `c'
Here’s another example with a slightly different result:
# foo.rb class Foo attr_accessor :locations def initialize(skip) @locations = caller_locations(skip) end end Foo.new(0..2).locations.map do |call| puts call.to_s end
Now run ruby foo.rb
and you should see:
init.rb:4:in `initialize' init.rb:8:in `new' init.rb:8:in `<main>'
Patterns used to parse URI’s
Indicates some other unhandled resolver error was encountered.
A generic resource abstract class.
Converts Ruby link flags into something cargo understands
A visitor that knows how to convert a prism syntax tree into the whitequark/parser gem’s syntax tree.
Accepts a list of prism tokens and converts them into the expected format for the parser gem.
This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper
that returns the arrays of [type, *children].
This class mirrors the ::Ripper::SexpBuilderPP subclass of ::Ripper
that returns the same values as ::Ripper::SexpBuilder except with a couple of niceties that flatten linked lists into arrays.