Ruby: RObject Struct Reference

Ruby 4.0.6p0 (2026-07-14 revision 03b6d3f8898a28604fe6cb00eae3226b821168f4)

Data Fields
RObject Struct Reference

Ruby's ordinal objects. More...

`#include <robject.h>`

## Data Fields
struct RBasic | basic
| Basic part, including flags and class.
union { |
struct { |
VALUE * fields |
| Pointer to a C array that holds instance variables. More...
} heap
| Object that use separated memory region for instance variables use this pattern. More...
VALUE ary [1] |
} | as
| Object's specific fields.

## Detailed Description

Ruby's ordinal objects.

Unless otherwise special cased, all predefined and user-defined classes share this struct to hold their instances.

Definition at line 85 of file robject.h.

## Field Documentation

## ◆ ary

VALUE RObject::ary[1]

Definition at line 110 of file robject.h.

## ◆ [union]

union { ... } RObject::as

Object's specific fields.

## ◆ basic

struct RBasic RObject::basic

Basic part, including flags and class.

Definition at line 88 of file robject.h.

## ◆ fields

VALUE* RObject::fields

Pointer to a C array that holds instance variables.

Definition at line 99 of file robject.h.

## ◆ [struct]

struct { ... } RObject::heap

Object that use separated memory region for instance variables use this pattern.

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

- include/ruby/internal/core/robject.h