ruby/ruby
Glossary
Terms and shorthands used throughout the Ruby source tree.
| Term | Meaning |
|---|---|
| CRuby / MRI | This implementation. "Matz's Ruby Interpreter" was the historical name; "CRuby" is the modern one (since C is the implementation language). Other implementations include JRuby (JVM) and TruffleRuby (GraalVM). |
| VALUE | The C type for a tagged Ruby object reference (include/ruby/internal/value.h). Every Ruby-level object is passed around as a VALUE. Small integers, nil, true, false, and short symbols are encoded directly in the bits. |
| iseq | "Instruction sequence". The compiled bytecode form of a method, block, or top-level program. Defined in iseq.h, allocated in iseq.c, and emitted by compile.c. |
| insns.def | The single source of truth for the VM's bytecode instructions. tool/ruby_vm/ consumes it to generate vm_exec.c, vmtc.inc, and JIT helpers. |
| NODE | The historical AST node type produced by parse.y. Defined in node.h and rubyparser.h. Lazily replaced by Prism's typed AST. |
| rb_vm_t | The process-global VM state struct (vm_core.h). One per Ruby process, but Ractors carve out per-Ractor state. |
| rb_thread_t | A Ruby-level thread. Holds a stack of control frames and a pointer to its Ractor. |
| rb_control_frame_t / CFP | A single VM frame on the Ruby stack. The current frame pointer is ec->cfp. |
EC (rb_execution_context_t) |
Per-thread execution state — the VM stack, the current frame pointer, the trace point flags, and so on. The macro GET_EC() retrieves the running thread's EC. |
| GVL | Global VM Lock. A per-Ractor lock that ensures at most one Ruby thread per Ractor runs Ruby bytecode at a time. Implemented in thread_pthread.c and thread_win32.c. |
| YJIT | Yet-Another-Just-In-Time-compiler. Lazy basic-block versioning JIT, written in Rust. Lives in yjit/. |
| ZJIT | The newer of the two Rust JITs, with a higher-level IR-based optimizer. Lives in zjit/. |
| Prism | The portable hand-written Ruby parser, formerly known as YARP. Lives in prism/ and is also published as a standalone gem and library. |
| Lrama | The Ruby-implemented LALR parser generator that replaced GNU Bison for parse.y. Lives in tool/lrama/. |
| Onigmo | The regular expression engine bundled with Ruby. Sources are regcomp.c, regexec.c, regparse.c, regenc.c, etc. A fork of Oniguruma. |
| mkmf | "Make Makefile". The Ruby library (lib/mkmf.rb) that C extensions use to detect headers/libraries and emit a Makefile from an extconf.rb. |
| rb_obj_t / RObject | The in-memory layout of a generic Ruby object. Defined in include/ruby/internal/core/robject.h. |
| shape | A small record describing the layout of an object's instance variables. Method/IV access caches key off shape IDs. Defined in shape.h / shape.c. |
| inline cache (IC) | A cache embedded in the iseq that records the result of a previous method or constant lookup. Defined in vm_callinfo.h. |
| callinfo / callcache | Companion records that describe a call site (rb_callinfo) and its currently cached target (rb_callcache). |
| Ractor | An "actor" — an isolated parallel execution context introduced in Ruby 3.0. Implemented in ractor.c/ractor_sync.c. |
| Fiber | A cooperative coroutine. Stack switching is implemented in coroutine/<arch>/Context.S; the high-level API lives in cont.c. |
| Fiber Scheduler | A pluggable Ruby-level interface (scheduler.c) that lets external gems implement async IO event loops. |
| default gem | A library shipped with Ruby that is also published as a regular gem on rubygems.org (e.g., json, prism, optparse). Sources in this repo are mirrored from upstream gem repositories. |
| bundled gem | A gem that Ruby installs but doesn't require automatically (e.g., minitest, rake). Listed in gems/bundled_gems. |
| base ruby | The pre-existing Ruby used to bootstrap the build (./tool/runruby.rb, BASERUBY in the Makefile). |
| miniruby | A minimal Ruby produced early in the build, statically linked, used to run the build's Ruby tools. |
| GC compaction | The optional moving GC step that compacts the heap. See gc.c (gc_compact_*) and the GC.compact method. |
| WeakMap / WeakKeyMap | Map types whose entries do not prevent GC of their keys/values. Implemented in weakmap.c. |
| MMTk | Memory Management Toolkit — a Rust GC research framework. Ruby has an experimental binding in gc/mmtk/. |
| trace point | A user-installable callback that fires on VM events like :line or :call. Implemented in vm_trace.c. |
| catch table | The per-iseq table that lists rescue/ensure/retry/break targets. Walked when an exception propagates. |
GVL release / nogvl |
A region of C code that releases the GVL via rb_thread_call_without_gvl. Lets blocking syscalls run in parallel. |
| bts / btest | The bootstraptest/ test suite — small smoke tests run very early in the build. |
| NEWS.md | The user-visible changelog for the release in development. |
| dev branch / master | This repository's main branch. There is no main; new work targets master. |
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.