← All reportsPublic report

ruby/ruby

The Ruby Programming Language

24k stars Ruby View on GitHubprofiled 14d ago
Try GitZoid
400PRs this week
45Contributors
0Deps scanned
0Issues found
01 · Repo overview

How ruby is put together

ruby/ruby is the reference implementation of the Ruby programming language: an interpreter written primarily in C with a bytecode VM (vm.c executing instructions defined in insns.def), a hand-written parser grammar (parse.y) plus the newer Prism-based pipeline (prism_compile.c/prism_init.c), a generational garbage collector (gc.c), and two Rust-based JIT compiler tiers (YJIT and ZJIT) linked into the interpreter through a single staticlib crate at ruby.rs. Core classes are implemented in pairs: a C implementation (e.g., array.c, string.c, hash.c) and a Ruby-level builtin bootstrap (array.rb, string.rb, kernel.rb) compiled into the VM via builtin.c/prelude.rb. Platform abstraction spans POSIX pthreads (thread_pthread.c), Windows threads (thread_win32.c), and M:N scheduling (thread_pthread_mn.c). The repo also vendors RubyGems and Bundler under lib/, and builds via GNU autotools (configure.ac -> config.status), which tool/mkconfig.rb converts into rbconfig.rb used by mkmf for native extensions.

Languages

CRubyRustYacc/Bison grammar (parse.y)Autoconf macros

Infrastructure

GitHub Actions CI workflows (MinGW, Ubuntu, Windows badges referenced in README.md)Travis CI (badge in README.md)GNU autotools build system (configure.ac, aclocal.m4)vcpkg manifest (vcpkg.json)

Major components

Bytecode Virtual Machine

Executes compiled instruction sequences; vm.c implements the interpreter loop driven by insns.def, with call-frame handling in vm_args.c, backtraces in vm_backtrace.c, and core VM structures in vm_core.h.

Parser & Compiler

Parses Ruby source with the Bison grammar parse.y and compiles AST to bytecode via compile.c, with the alternative Prism frontend integrated through prism_compile.c, prism_init.c, and universal_parser.c.

Garbage Collector & Object Shapes

Implements the GC heap and object lifetime management in gc.c, with hidden-variable object layout handled by shape.c/shapes.

YJIT / ZJIT Rust Compilers

Optional just-in-time compilers implemented in Rust workspaces (yjit/, zjit/) that statically link into ruby via the ruby.rs staticlib crate, sharing the jit crate; disassembly support uses capstone.

Core Classes & Builtins

Implements fundamental object system and core types in C (object.c, class.c, array.c, string.c, hash.c, numeric.c, bignum.c, struct.c, proc.c, enum.c) paired with Ruby-level builtin bootstraps (*.rb) loaded via mini_builtin.c and prelude.rb.

Concurrency: Threads & Ractors

Provides platform thread backends (thread_pthread.c, thread_win32.c, thread_none.c), synchronization primitives (thread_sync.c/.rb, cont.c fibers), and parallel Ractor execution (ractor.c, ractor.rb).

Encodings, Regex & Text Processing

Handles character encodings (encoding.c, transcode.c), the oniguruma-style regex engine (regcomp.c, regexec.c, regparse.c), sprintf/pack formatting, and Marshal serialization (marshal.c).

Vendored Tooling: RubyGems & Bundler

Ships the gem/package ecosystem inside the interpreter tree, including Bundler's spec resolution (lib/bundler/index.rb), layered configuration (lib/bundler/settings.rb), and environment preservation (lib/bundler/environment_preserver.rb).

The Ruby core team spent the last several weeks on deep performance and memory work: making hashes and arrays use less memory and run faster, shrinking internal compiler data structures, and continuing a major overhaul of the IO::Buffer class (locks, resizing, memory views). Security and correctness fixes also landed, including a Marshal buffer-overflow fix, safer networking timeouts in resolv and net-protocol, and cleanup of deprecated JSON APIs. Bundler/RubyGems saw steady improvements like proxy handling and a new 'cooldown' option to avoid installing too-new gem versions, while the experimental ZJIT compiler kept maturing.

Week by week

2026-08-24A big week for IO::Buffer hardening plus array/hash optimizations and safer networking defaults.latest6 changes

Feature

Net::BufferedIO#readuntil gains a limit option

Added a size limit to network reads to prevent unbounded memory use, along with fixes for a terminator spanning two reads.

Fix

Fixed array splicing with shared buffers

Corrected a bug where modifying an array that shares its underlying storage with another could corrupt the longer array.

Refactor

Array#flatten uses an internal set

Replaced the flatten operation's internal identity hash with a lighter-weight set for faster duplicate detection.

Feature

IO::Buffer is now MemoryView ready

Buffers can now be shared safely with external libraries through Ruby's MemoryView mechanism.

Fix

Resolv drops dead TCP connections

DNS lookups now apply request deadlines to TCP reads and discard connections that cannot carry more requests.

Chore

RubyGems shows release notes instead of full changelogs

Updating RubyGems itself now prints a short link to release notes rather than dumping the whole changelog.

2026-08-17Memory reductions across procs, threads, and hashes, alongside continued IO::Buffer refinement.6 changes

Refactor

Proc objects use less memory

Reduced the memory footprint of proc (block) objects by trimming internal bookkeeping.

Refactor

Hashes are right-sized more often

Split hash allocation from initialization so many hashes now allocate only the capacity they actually need.

Feature

IO::Buffer slices resize without reallocation

Slices of a buffer can now be resized without copying or reallocating their root buffer's storage.

Refactor

Thread scheduler lock contention reduced

Context switches, timed sleeps, and pool handoffs no longer hold the global scheduler lock, improving multi-threaded throughput.

Fix

Bundler restores NO_PROXY wildcard support

Proxy detection again honors NO_PROXY="*" and documents how proxy environment variables behave.

Docs

File method documentation expanded

Added clearer docs and examples for File methods like directory?, unlink, chmod, chown, and basename.

2026-08-10Compiler internals slimmed down, GC tuned, and a hierarchical timer wheel replaced the thread wait list.6 changes

Refactor

Dynamic-size array tables for small hashes

Small hashes now use flexibly sized internal tables instead of a fixed maximum, saving memory.

Refactor

Hierarchical timer wheel for thread waits

Replaced the linear list of timed-waiting threads with a timer wheel, making sleep/timeout handling faster at scale.

Fix

Coroutines stop writing after switching away

Fixed low-level coroutine switching that could write to a stack after control had moved elsewhere.

Fix

Weak tables protect dead keys

Prevented writing shape information into weak-table entries whose keys had already been collected.

Chore

Build caching for generated dependencies

Cached dependency freshness checks and source directives to speed up builds.

Fix

Digest builds fixed on Windows and i686

Corrected SIMD compiler-flag detection for Visual C++ and build failures on 32-bit systems.

2026-08-03A security-focused week: Marshal overread fix, stricter SafeMarshal limits, plus ZJIT cleanups and Ractor shutdown fixes.6 changes

Fix

Marshal.load buffer overflow fixed

Patched an out-of-bounds read when loading a string body via Marshal, closing a potential crash or data-exposure bug.

Fix

SafeMarshal rejects oversized collections

Gem::SafeMarshal now rejects serialized collections whose declared lengths exceed the remaining input.

Fix

Ractor post-mortem collection fixed

A dying Ractor thread now cleans up its own object space, and heap dumps include those 'zombie' spaces.

Refactor

Small-hash lookup sped up with SWAR

Used a word-level parallelism trick to speed up finding entries inside compact hash tables.

Refactor

ZJIT identifiers shrunk to u32

Internal instruction and block IDs were narrowed to 32-bit integers and redundant lookups removed for speed.

Chore

RubyGems dropped vendored HTTP libraries

Removed bundled net-http-persistent and connection_pool in favor of the standard Gem::Request path.

2026-07-27A cleanup week dominated by removing long-deprecated JSON APIs and introducing a RubyGems 'cooldown'.6 changes

Feature

RubyGems cooldown period added

A new :cooldown: setting delays gem install/update resolution so brand-new releases can be skipped if buggy.

Fix

Long file paths enabled without registry edits

Windows builds now support paths longer than 260 characters without requiring a registry value.

Chore

JSON deprecated APIs removed

Removed legacy entry points like JSON.fast_generate, j/jj, GenericObject, and default_options accessors ahead of a major version bump.

Feature

JSON stricter defaults

Duplicate keys and comments in JSON input are now rejected by default for safer parsing.

Fix

gem uninstall --user-install crash fixed

No longer crashes when the GEM_HOME directory does not exist during user-level uninstall.

Chore

Bundler lock options accumulate

Repeated bundle lock command-line flags now correctly combine instead of overriding each other.

03 · Security check

Dependencies and code review

0 dependencies scanned

Dependency advisories

Security Watch

No known advisories across 0 scanned dependencies.

No known advisories in the scanned dependencies.

Code review

No concrete code-level issues confirmed.

Get this report every week for your repos.

GitZoid learns each repo, reports what changed, and flags what needs attention. One flat price for the whole team.

$19 a month, flat · First 10 outputs free · No card required