How does Ruby get the information for RUBY_PLATFORM?
On my machine the value is x86_64-linux
. I can use a shell command
arch
to get “x86_64”. Where does is get the “linux” part?
How does Ruby get the information for RUBY_PLATFORM?
On my machine the value is x86_64-linux
. I can use a shell command
arch
to get “x86_64”. Where does is get the “linux” part?
Probably from uname -o
This is in the source for ruby-1.8.7-p352:
$ grep RUBY_PLATFORM configure
#define RUBY_PLATFORM ARCHITECTURE “-${target_os}”
#define RUBY_PLATFORM “${arch}”
And target_os is determined by autoconf. See
http://sources.redhat.com/autobook/autobook/autobook_261.html
autoconf is a mess of shell scripts and m4, have fun digging through
them
On Tue, Aug 7, 2012 at 7:54 AM, Intransition [email protected]
wrote:
How does Ruby get the information for RUBY_PLATFORM?
Look at e.g. ruby-1.9.3-p194/.ext/include/i686-linux/ruby/config.h
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs