]> git.openstreetmap.org Git - rails.git/blob - vendor/gems/rspec-1.1.2/spec/ruby_forker.rb
Show whether a trace is public or private in the trace list, so that a user can easil...
[rails.git] / vendor / gems / rspec-1.1.2 / spec / ruby_forker.rb
1 require 'rbconfig'
2
3 module RubyForker
4   # Forks a ruby interpreter with same type as ourself.
5   # juby will fork jruby, ruby will fork ruby etc.
6   def ruby(args, stderr=nil)
7     config       = ::Config::CONFIG
8     interpreter  = File::join(config['bindir'], config['ruby_install_name']) + config['EXEEXT']
9     cmd = "#{interpreter} #{args}"
10     cmd << " 2> #{stderr}" unless stderr.nil?
11     `#{cmd}`
12   end
13 end