Skip to content

Make Fiddle::Pointer#to_s with JRuby consistent with CRuby #176

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

Merged
merged 1 commit into from
Apr 19, 2025

Conversation

ankane
Copy link
Contributor

@ankane ankane commented Apr 19, 2025

Hi, this PR makes the behavior of Fiddle::Pointer#to_s consistent between CRuby and JRuby.

ptr = Fiddle::Pointer.malloc(4)
p ptr.to_s(4)

currently outputs "\x00\x00\x00\x00" with CRuby and "" with JRuby.

@kou kou merged commit 29acd98 into ruby:master Apr 19, 2025
62 of 66 checks passed
@kou
Copy link
Member

kou commented Apr 19, 2025

Good catch!

@ankane
Copy link
Contributor Author

ankane commented Apr 19, 2025

Thanks. Just fyi, reported the test failures here: jruby/jruby#8780.

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.

2 participants