Sha256: e1cde9e0909a19ce983355775a3acc77144c1a5d0000a930d622229bdc8df65b
Contents?: true
Size: 410 Bytes
Versions: 9
Compression:
Stored size: 410 Bytes
Contents
require 'rbconfig' module RubyForker # Forks a ruby interpreter with same type as ourself. # juby will fork jruby, ruby will fork ruby etc. def ruby(args, stderr=nil) config = ::Config::CONFIG interpreter = File::join(config['bindir'], config['ruby_install_name']) + config['EXEEXT'] cmd = "#{interpreter} #{args}" cmd << " 2> #{stderr}" unless stderr.nil? `#{cmd}` end end
Version data entries
9 entries across 9 versions & 1 rubygems