Skip to content
On this page
class · Ruby 4.0

Prism::NumberedReferenceReadNode

< Prism::Node 10 instance methods 2 class methods

Represents reading a numbered reference to a capture in the previous match.

$1
^^

Class methods 2

Instance methods 10

Attributes
Read

The (1-indexed, from the left) number of the capture group. Numbered references that are too large result in this value being 0.

Example
$1          # number `1`

$5432       # number `5432`

$4294967296 # number `0`