Ruby: pm_locals Struct Reference

Ruby 4.0.5p0 (2026-05-20 revision 64336ffd0ee9e1f4c05891695a3d7b49cb709721)

Data Fields
pm_locals Struct Reference

This is a set of local variables in a certain lexical context (method, class, module, etc.). More...

`#include <parser.h>`

## Data Fields
uint32_t | size
| The number of local variables in the set.
uint32_t | capacity
| The capacity of the local variables set.
pm_local_t * | locals
| The nullable allocated memory for the local variables in the set.

## Detailed Description

This is a set of local variables in a certain lexical context (method, class, module, etc.).

We need to track how many times these variables are read in order to warn if they only get written.

Definition at line 557 of file parser.h.

## Field Documentation

## ◆ capacity

uint32_t pm_locals::capacity

The capacity of the local variables set.

Definition at line 562 of file parser.h.

## ◆ locals

pm_local_t* pm_locals::locals

The nullable allocated memory for the local variables in the set.

Definition at line 565 of file parser.h.

## ◆ size

uint32_t pm_locals::size

The number of local variables in the set.

Definition at line 559 of file parser.h.

The documentation for this struct was generated from the following file:

- prism/parser.h