lib/vnctools/server.rb in vnctools-0.0.8 vs lib/vnctools/server.rb in vnctools-0.0.9.pre1
- old
+ new
@@ -32,11 +32,12 @@
def start
if display
server(display, *launch_arguments)
else
output = server(*launch_arguments)
- @display = output[/desktop is #{host}(\S+)/, 1]
- @display or raise Error, "could not find display in #{output.inspect}"
+ rx = /desktop is #{host}(\S+)/
+ @display = output[rx, 1]
+ @display or raise Error, "could not find display in #{output.inspect} =~ #{rx.source}"
end
end
def stop(force = false)
server "-kill", display.to_s