Skip to content

Fix the extension build on current Ruby#58

Merged
hsbt merged 3 commits into
masterfrom
claude/musing-bohr-dae004
Jun 24, 2026
Merged

Fix the extension build on current Ruby#58
hsbt merged 3 commits into
masterfrom
claude/musing-bohr-dae004

Conversation

@hsbt

@hsbt hsbt commented Jun 24, 2026

Copy link
Copy Markdown
Member

Current Ruby no longer builds this extension. The untyped Data API (Data_Wrap_Struct and Data_Get_Struct) and the taint API (OBJ_TAINT and OBJ_TAINTED) have both been removed, and extensions are now compiled with -std=gnu23 which rejects old K&R function definitions.

Every wrapper now uses the TypedData API. Parser-owned nodes use a free-less data type whose parent is the node type so a single accessor handles both kinds. OBJ_TAINT and OBJ_TAINTED fall back to no-ops where Ruby no longer defines them. The K&R definition of syck_yaml2byte_handler is rewritten as a prototype.

Verified the build and the full test suite on Ruby head, 3.4, and 2.4.

hsbt and others added 3 commits June 24, 2026 16:23
Data_Wrap_Struct and Data_Get_Struct no longer exist in current Ruby.
Parser-owned nodes use a free-less data type whose parent is the node
type, so a single accessor still fetches either kind of node.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The taint API was removed from current Ruby. Fall back to no-ops where
it is missing, keeping the existing calls valid on older versions that
still ship it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Current Ruby builds extensions with -std=gnu23, which rejects the old
K&R function definition.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hsbt hsbt merged commit 72aea55 into master Jun 24, 2026
48 checks passed
@hsbt hsbt deleted the claude/musing-bohr-dae004 branch June 24, 2026 07:30
@hsbt hsbt mentioned this pull request Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant