Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Qtrue, Qfalse, Qnil, and Qundef as constants #115

Merged
merged 1 commit into from
Nov 22, 2022
Merged

Conversation

tenderlove
Copy link
Member

It's easy to get access to Qtrue, Qfalse, and Qnil via Fiddle. You can just do Fiddle.dlwrap(true). But it's not possible to get access to Qundef from pure Ruby.

This patch adds all of these magic constants as constants on Fiddle so that we can write JIT compilers in pure Ruby.

It's easy to get access to `Qtrue`, `Qfalse`, and `Qnil` via Fiddle.
You can just do `Fiddle.dlwrap(true)`.  But it's not possible to get
access to `Qundef` from pure Ruby.

This patch adds all of these magic constants as constants on Fiddle so
that we can write JIT compilers in pure Ruby.
Copy link
Member

@k0kubun k0kubun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@tenderlove tenderlove merged commit a365d26 into master Nov 22, 2022
@tenderlove tenderlove deleted the add-constants branch November 22, 2022 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants