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

Use i686 on any x86 Linux platform #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cschramm
Copy link

This fixes #16

...but print a warning if Ruby reports other than i686
@cschramm
Copy link
Author

Any comments?

@jabr
Copy link
Collaborator

jabr commented Sep 25, 2013

Is this still an issue?

If so, what is everyone's thoughts on adding a new platform for this? LinuxUnknown? And it assumes i686 support along with a warning message?

@cschramm
Copy link
Author

Yes, this is still true for Debian's and probably many other binary rubies. Personally I think a new platform is a little overkill. I like my minimal solution better. 😉

end

def warn
STDERR.puts "WARNING! Using i686, but Ruby was compiled for #{architecture}. You can check your actual architecture with uname -m." if architecture =~ /i[3-5]86/
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method overwrites Kernel.warn, which ironically enough, is probably what you want instead of writing to stderr: http://ruby-doc.org/core-2.2.3/Kernel.html#method-i-warn

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.

Linux i486
3 participants