Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: a37ff24ff9
Fetching contributors…

Cannot retrieve contributors at this time

14 lines (12 sloc) 0.413 kb
require 'rbconfig'
module RubyForker
# Forks a ruby interpreter with same type as ourself.
# jruby will fork jruby, ruby will fork ruby etc.
def ruby(args, stderr=nil)
config = ::RbConfig::CONFIG
interpreter = File::join(config['bindir'], config['ruby_install_name']) + config['EXEEXT']
cmd = "#{interpreter} #{args}"
cmd << " 2> #{stderr}" unless stderr.nil?
`#{cmd}`
end
end
Jump to Line
Something went wrong with that request. Please try again.