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
rspec-core-2.0.0.beta.1 spec/ruby_forker.rb
rspec-core-2.0.0.a10 spec/ruby_forker.rb
rspec-core-2.0.0.a9 spec/ruby_forker.rb
rspec-core-2.0.0.a8 spec/ruby_forker.rb
rspec-core-2.0.0.a7 spec/ruby_forker.rb
rspec-core-2.0.0.a6 spec/ruby_forker.rb
rspec-core-2.0.0.a5 spec/ruby_forker.rb
rspec-core-2.0.0.a4 spec/ruby_forker.rb
rspec-core-2.0.0.a3 spec/ruby_forker.rb
rspec-1.3.0 spec/ruby_forker.rb
hubbub-0.0.11 lib/vendor/plugins/rspec/spec/ruby_forker.rb
hubbub-0.0.10 lib/vendor/plugins/rspec/spec/ruby_forker.rb
hubbub-0.0.9 lib/vendor/plugins/rspec/spec/ruby_forker.rb
hubbub-0.0.8 lib/vendor/plugins/rspec/spec/ruby_forker.rb
hubbub-0.0.6 lib/vendor/plugins/rspec/spec/ruby_forker.rb
simple-templater-0.0.1.4 gems/gems/rspec-1.2.9/spec/ruby_forker.rb
media-path-0.1.2 vendor/rspec/spec/ruby_forker.rb
simple-templater-0.0.1.3 vendor/rspec/spec/ruby_forker.rb
pupu-0.0.2.pre vendor/rspec/spec/ruby_forker.rb
media-path-0.1.1.pre vendor/rspec/spec/ruby_forker.rb