ruby / fiddle

A libffi wrapper for Ruby.
BSD 2-Clause "Simplified" License
154 stars 37 forks source link

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

Closed tenderlove closed 1 year ago

tenderlove commented 1 year ago

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.