-
Notifications
You must be signed in to change notification settings - Fork 63
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
mspec updates through 202411051711 #70
Conversation
…r#size What a "word" is when talking about sizes is confusing because it's a highly overloaded term. Intel, Microsoft, and GDB are just a few vendors that have their own definition of what a "word" is. Specs that used the "wordsize" guard actually were mostly testing for the size of the C `long` fundamental type, so rename the guard for clarity. Also, get the size of `long` directly from RbConfig instead of guessing using Integer#size. Integer#size is not guaranteed to have anything to do with the `long` type.
There is no guarantee that Integer#size will continue to return `sizeof(long)` for small integers. Use the `l!` specifier for Array#pack instead. It is a public interface that has a direct relationship with the `long` type.
It's better than guessing based on the pointer size if the implementation provides it directly.
These were removed by CRuby but that breaks running older rubyspec with new mspec. We restore them here while the change propagates into rubyspec.
@eregon Please review. The |
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.
Thank you, this looks good, and I think it's worth keeping the word_size stuff a bit longer, deprecating it should be enough to avoid having new usages.
No description provided.