Sha256: 5333f2261c3ce6102e6c56cae66c9f80989c23c8b51ab94743d11aa3ba73252c

Contents?: true

Size: 409 Bytes

Versions: 142

Compression:

Stored size: 409 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

142 entries across 142 versions & 23 rubygems

Version Path
dchelimsky-rspec-1.1.10 spec/ruby_forker.rb
dchelimsky-rspec-1.1.11.1 spec/ruby_forker.rb
dchelimsky-rspec-1.1.11.2 spec/ruby_forker.rb
dchelimsky-rspec-1.1.11.3 spec/ruby_forker.rb
dchelimsky-rspec-1.1.11.4 spec/ruby_forker.rb
dchelimsky-rspec-1.1.11.5 spec/ruby_forker.rb
dchelimsky-rspec-1.1.11.6 spec/ruby_forker.rb
dchelimsky-rspec-1.1.11.7 spec/ruby_forker.rb
dchelimsky-rspec-1.1.11 spec/ruby_forker.rb
dchelimsky-rspec-1.1.12 spec/ruby_forker.rb
dchelimsky-rspec-1.1.99.1 spec/ruby_forker.rb
dchelimsky-rspec-1.1.99.13 spec/ruby_forker.rb
dchelimsky-rspec-1.1.99.2 spec/ruby_forker.rb
dchelimsky-rspec-1.1.99.3 spec/ruby_forker.rb
dchelimsky-rspec-1.1.99.4 spec/ruby_forker.rb
dchelimsky-rspec-1.1.99.5 spec/ruby_forker.rb
dchelimsky-rspec-1.1.99.6 spec/ruby_forker.rb
dchelimsky-rspec-1.1.99.7 spec/ruby_forker.rb
dchelimsky-rspec-1.1.99.8 spec/ruby_forker.rb
dchelimsky-rspec-1.1.99.9 spec/ruby_forker.rb