# File lib/rubygems/server.rb, line 827 def launch listeners = @server.listeners.map{|l| l.addr[2] } # TODO: 0.0.0.0 == any, not localhost. host = listeners.any?{|l| l == '0.0.0.0'} ? 'localhost' : listeners.first say "Launching browser to http://#{host}:#{@port}" system("#{@launch} http://#{host}:#{@port}") end