Skip to content

Conversation

@pull
Copy link

@pull pull bot commented Nov 2, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

peterzhu2118 and others added 15 commits November 2, 2025 09:17
We need to allocate at least sizeof(struct RString) when the string is
embedded on garbage collectors that support slot sizes less than 40 bytes.
We need to allocate at least sizeof(struct RArray) when the array is
embedded on garbage collectors that support slot sizes less than 40 bytes.
Fix: ruby/json#873

This allow users to encode binary strings if they so wish.
e.g. they can use Base64 or similar, or chose to replace invalid
characters with something else.

ruby/json@b1b16c416f
Classes/modules defined in a namespace are defined under ::Object
as usual (as without namespaces), and it'll be set into the const_tbl
of ::Object.
In namespaces, namespace objects' const_tbl is equal to the one of ::Object.
So constants of ::Object are just equal to constants of the namespace.

That means, top level classes/modules in a namespace can be referred
as namespace::KlassName without calling rb_define_class_under_id().
There are many APIs that expects application codes overwrite global methods.
For example, warn() expects Warning.warn() is overwritten to hook warning
messages.
If we enable namespace, Warning.warn defined in the app code is visible
only in the namespace, and invisible from warn() defined in the root namespace.
So we have to enable users to overwrite Warning.warn in the root namespace.

This is ugly and temporal workaround. We need to define better APIs to enable
users to hook such behaviors in the different way from defining global methods.
@pull pull bot locked and limited conversation to collaborators Nov 2, 2025
@pull pull bot added the ⤵️ pull label Nov 2, 2025
@pull pull bot merged commit 4a3d834 into turkdevops:master Nov 2, 2025
1 check failed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants