Module: RbConfig

Defined in:
lib/framework/rbconfig.rb

Overview

This file was created by mkconfig.rb when ruby was built. It contains build information for ruby which is used e.g. by mkmf to build compatible native extensions. Any changes made to this file will be lost the next time ruby is built.

Constant Summary collapse

TOPDIR =
File.dirname(__FILE__).chomp!("/lib/ruby/2.3.0/x86_64-darwin16")
DESTDIR =
''
CONFIG =
{}
MAKEFILE_CONFIG =
{}

Class Method Summary collapse

Class Method Details

.expand(val, config = CONFIG) ⇒ Object



250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# File 'lib/framework/rbconfig.rb', line 250

def RbConfig::expand(val, config = CONFIG)
  newval = val.gsub(/\$\$|\$\(([^()]+)\)|\$\{([^{}]+)\}/) {
    var = $&
    if !(v = $1 || $2)
'$'
    elsif key = config[v = v[/\A[^:]+(?=(?::(.*?)=(.*))?\z)/]]
pat, sub = $1, $2
config[v] = false
config[v] = RbConfig::expand(key, config)
key = key.gsub(/#{Regexp.quote(pat)}(?=\s|\z)/n) {sub} if pat
key
    else
var
    end
  }
  val.replace(newval) unless newval == val
  val
end

.rubyObject

returns the absolute pathname of the ruby command.



273
274
275
276
277
278
# File 'lib/framework/rbconfig.rb', line 273

def RbConfig.ruby
  File.join(
    RbConfig::CONFIG["bindir"],
    RbConfig::CONFIG["ruby_install_name"] + RbConfig::CONFIG["EXEEXT"]
  )
end