You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks!
Ideally extern "bool foo(void *buffer)" would return Ruby true/false, not 1/0 (which are both truthy in Ruby).
Do you think Fiddle could handle that?
@kou Should we revert bc6c66b maybe? Because if bool is then implemented properly to use Ruby true/false instead of 1/0 then it would be incompatible when that changes.
Activity
kou commentedon Jul 3, 2023
Good catch.
I've implemented it.
eregon commentedon Jul 30, 2023
Thanks!
Ideally
extern "bool foo(void *buffer)"would return Ruby true/false, not 1/0 (which are both truthy in Ruby).Do you think Fiddle could handle that?
kou commentedon Jul 30, 2023
Ah, then we should not implement
boolas an alias.[ruby/fiddle] Add support for bool
eregon commentedon Oct 27, 2023
@kou Should we revert bc6c66b maybe? Because if
boolis then implemented properly to use Ruby true/false instead of 1/0 then it would be incompatible when that changes.kou commentedon Oct 27, 2023
Is it for Ruby 3.3.0?
If I can implement
bool<-> Ruby'strue/falsesoon, we don't need to revert the commit, right?kou commentedon Oct 27, 2023
Implemented.
eregon commentedon Oct 29, 2023
Thanks!
Yeah, I just wanted to avoid the half-done support for boolean to get in a Fiddle release, or if it did for as short as possible.
[ruby/fiddle] Use Ruby's true/false for C bool
Add support for bool
Use Ruby's true/false for C bool