Skip to content
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

Move FFI::Platform::CPU from C to Ruby and remove duplicated libtest #663

Merged
merged 2 commits into from Jan 23, 2019

Conversation

larskanis
Copy link
Member

See the commit messages for more details.

The CPU detection was moved to C 10 years ago as a workaround to an
incorrect RbConfig::CONFIG['host_cpu'] value on MacOS.
This was in commit c53282a .
Although I can't reproduce the original environment, I guess that
this issue has been fixed years ago, so that the workaround isn't
necessary anymore.

Moving CPU detection to Ruby allows to use lib/ffi/platform.rb in
Rakefile before the C ext is built.
The test library has been moved to spec/ffi/fixtures and it's built
by the spec helper. This was in commit c79e9f5 .

Since that time we managed two copies of these tests, but only the one
in spec/ffi/fixtures is actually used.
@eregon
Copy link
Collaborator

eregon commented Jan 15, 2019

Looks great to me.
I was wondering what was these duplicated files in libtest.

@eregon
Copy link
Collaborator

eregon commented Jan 22, 2019

Let's merge this :) Anything we need to wait for?

@larskanis larskanis merged commit bc556a1 into ffi:master Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants