xjdpjg
Last Updated: February 25, 2016
·
910
· jbowles
9608da7db688950cfd161f51feb648ba

RbConfig is nice

ruby 1.9.3 RbConfig module makes getting system info nice!

File.join(*RbConfig::CONFIG.valuesat('bindir','RUBYINSTALLNAME'))
datadir = RbConfig::CONFIG['datadir']
os = RbConfig::CONFIG['host
os']

And more:
rbconfig = File.join(*RbConfig::CONFIG.keys)

Say Thanks
Respond