Module: RbConfig
- Defined in:
- lib/framework/rbconfig.rb
Overview
This file was created by mkconfig.rb when ruby was built. Any changes made to this file will be lost the next time ruby is built.
Constant Summary collapse
- CONFIG =
{}
- MAKEFILE_CONFIG =
{}
Class Method Summary collapse
- .expand(val, config = CONFIG) ⇒ Object
-
.ruby ⇒ Object
returns the absolute pathname of the ruby command.
Class Method Details
.expand(val, config = CONFIG) ⇒ Object
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/framework/rbconfig.rb', line 40 def RbConfig::(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::(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 |