aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/testing/isolation.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/testing/isolation.rb')
-rw-r--r--activesupport/lib/active_support/testing/isolation.rb12
1 files changed, 7 insertions, 5 deletions
diff --git a/activesupport/lib/active_support/testing/isolation.rb b/activesupport/lib/active_support/testing/isolation.rb
index d30b34ecd6..14edd13a8f 100644
--- a/activesupport/lib/active_support/testing/isolation.rb
+++ b/activesupport/lib/active_support/testing/isolation.rb
@@ -78,13 +78,15 @@ module ActiveSupport
"ISOLATION_OUTPUT" => tmpfile.path
}
- load_paths = $-I.map { |p| "-I\"#{File.expand_path(p)}\"" }.join(" ")
- orig_args = ORIG_ARGV.join(" ")
test_opts = "-n#{self.class.name}##{self.name}"
- command = "#{Gem.ruby} #{load_paths} #{$0} '#{orig_args}' #{test_opts}"
- # IO.popen lets us pass env in a cross-platform way
- child = IO.popen(env, command)
+ load_path_args = []
+ $-I.each do |p|
+ load_path_args << "-I"
+ load_path_args << File.expand_path(p)
+ end
+
+ child = IO.popen([env, Gem.ruby, *load_path_args, $0, *ORIG_ARGV, test_opts])
begin
Process.wait(child.pid)