You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: spec_helper.rb
    path of file: ./repos/passenger/test/ruby
    
    the code of the file until where you have to start completion: if GC.respond_to?(:copy_on_write_friendly?) && !GC.copy_on_write_friendly?
  GC.copy_on_write_friendly = true
end

RUBY_VERSION_INT = RUBY_VERSION.split('.')[0..2].join.to_i

source_root = File.expand_path(File.dirname(__FILE__) + "/../..")
Dir.chdir("#{source_root}/test")

require 'rubygems'
require 'json'
begin
  CONFIG = JSON.load(File.read('config.json'))
rescue Errno::ENOENT
  STDERR.puts "*** You do not have the file test/config.json. " <<
    "Please copy test/config.json.example to " <<
    "test/config.json, and edit it."
  exit 1
end

def boolean_option(name, default_value = false)
    
  def initialize(main_thread, deadline)
    @mutex = Mutex.new
    @cond  = ConditionVariable.new
    @iteration = 0
    @pipe  = IO.pipe

    @thread = Thread.new do
      Thread.current.abort_on_exception = true
      expected_iteration = 1
      ios = [@pipe[0]]
      while true
        @mutex.synchronize do
          while @iteration != expected_iteration
            @cond.wait(@mutex)
          end
        end
        if !select(ios, nil, nil, deadline)
          STDERR.puts "*** Test timed out (#{deadline} seconds)"
          STDERR.puts PhusionPassenger::Utils.global_backtrace_report
          main_thread.raise(Timeout::Error, "Test timed out")
          expected_iteration += 1
        elsif @pipe[0].read(1).nil?
          break
        else
          expected_iteration += 1
        end