Represents the use of the ‘..` or `…` operators to create flip flops.
baz if foo .. bar ^^^^^^^^^^
Represents writing to an instance variable in a context that doesn’t have an explicit value.
@foo, @bar = baz ^^^^ ^^^^
Represents a regular expression literal that contains interpolation that is being used in the predicate of a conditional to implicitly match against the last line read by an IO
object.
if /foo #{bar} baz/ then end ^^^^^^^^^^^^^^^^
Represents a regular expression literal used in the predicate of a conditional to implicitly match against the last line read by an IO
object.
if /foo/i then end ^^^^^^
Represents reading a numbered reference to a capture in the previous match.
$1 ^^
Represents the use of the ‘__ENCODING__` keyword.
__ENCODING__ ^^^^^^^^^^^^
This represents a source of Ruby code that has been parsed. It is used in conjunction with locations to allow them to resolve line numbers and source ranges.
Specialized version of Prism::Source
for source code that includes ASCII characters only. This class is used to apply performance optimizations that cannot be applied to sources that include multibyte characters.
In the extremely rare case that a source includes multi-byte characters but is marked as binary because of a magic encoding comment and it cannot be eagerly converted to UTF-8, this class will be used as well. This is because at that point we will treat everything as single-byte characters.
InlineComment
objects are the most common. They correspond to comments in the source file like this one that start with #.
This represents a magic comment that was encountered during parsing.
A class that knows how to walk down the tree. None of the individual visit methods are implemented on this visitor, so it forces the consumer to implement each one that they need. For a default implementation that continues walking the tree, see the Visitor
class.
Gem::DependencyList
is used for installing and uninstalling gems in the correct order to avoid conflicts.
Raised when trying to activate a gem, and that gem does not exist on the system. Instead of rescuing from this class, make sure to rescue from the superclass Gem::LoadError
to catch all types of load errors.
An error that indicates we weren’t able to fetch some data from a source
Base exception class for RubyGems. All exception raised by RubyGems are a subclass of this one.