ruby/tool/expand-config.rb

8 строки
162 B
Ruby
Executable File

STDOUT.binmode
ARGF.each do |line|
line.gsub!(/@([a-z_]\w*)@/i) {
(RbConfig::MAKEFILE_CONFIG[$1] or "").gsub(/\$\((.+?)\)/, %Q[${\\1}])
}
puts line
end