test/command.rb in activeldap-3.2.3 vs test/command.rb in activeldap-4.0.0
- old
+ new
@@ -30,10 +30,11 @@
def run(cmd, *args, &block)
raise ArgumentError, "command isn't specified" if cmd.nil?
if args.any? {|x| x.nil?}
raise ArgumentError, "args has nil: #{args.inspect}"
end
+ args = args.collect {|arg| arg.to_s}
return java_run(cmd, *args, &block) if Object.respond_to?(:java)
in_r, in_w = IO.pipe
out_r, out_w = IO.pipe
pid = nil
Thread.exclusive do
@@ -46,10 +47,10 @@
STDIN.reopen(in_r)
in_r.close
STDOUT.reopen(out_w)
STDERR.reopen(out_w)
out_w.close
- exec(cmd, *args.collect {|arg| arg.to_s})
+ exec(cmd, *args)
exit!(-1)
end
$VERBOSE = verbose
end
yield(out_r, in_w) if block_given?