Ruby 4.1.0dev (2026-10-26 revision 3e6368577177b3c3e2119fec09fb0f69edccabee)
Data Fields
rmatch_offset Struct Reference

Represents the region of a capture group. More...

#include <rmatch.h>

Data Fields

rb_len_t beg
 Beginning of a group.
 
rb_len_t end
 End of a group.
 

Detailed Description

Represents the region of a capture group.

This is basically for caching purpose. re_registers have similar concepts (beg and end) but they are in ptrdiff_t*. In order for us to implement MatchData#offset that info has to be converted to offset integers. This is the struct to hold such things.

Definition at line 65 of file rmatch.h.

Field Documentation

◆ beg

rb_len_t rmatch_offset::beg

Beginning of a group.

Definition at line 66 of file rmatch.h.

◆ end

rb_len_t rmatch_offset::end

End of a group.

Definition at line 67 of file rmatch.h.


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