-
Notifications
You must be signed in to change notification settings - Fork 55
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
specialize ArrayBuffer#to_s
and return ASCII-8BIT data
#384
base: main
Are you sure you want to change the base?
Conversation
Hey why doesn't linter give me an error message? I mean, there's nothing I can do about it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "bindgen" files are auto generated sources and that's why CI lint complains about. Would you mind implementing it in other ways? Also would you mind adding test cases?
Sorry for my lack of learning, but in my experiments, this worked fine. |
@krmbn0576 This one https://github.com/ruby/ruby.wasm/blob/main/packages/gems/js/ext/witapi/bindgen/rb-abi-guest.wit I recently moved the file and I might forget to update docs that pointing that old path. In that case, I'm sorry 🙇 |
Thanks! But it is unexpected. In that file, there are only definitions and no implementation. More to the point, there is not even a definition for the It seems I am overloaded to properly edit bindgen to bring a complete solution to this issue. But no worries. I have confirmed that the patch works properly and faster in my product. My issue has been resolved 😇 |
To fix #342 , specialize
ArrayBuffer#to_s
and return ASCII-8BIT data.Usage:
Of course this is destructive, but no one will spare the old behavior since the current to_s always returns [object ArrayBuffer] and is useless.