From 73fc0cc57276b6aef3f5301fd3987b1b6d1dd296 Mon Sep 17 00:00:00 2001 From: hsbt Date: Fri, 2 Jan 2015 06:53:12 +0000 Subject: * lib/webrick/utils.rb: removed unused argument variable. [fix GH-356] Patch by @vipulnsward * lib/webrick/server.rb: ditto. * lib/webrick/ssl.rb: ditto. * test/webrick/test_utils.rb: added test for WEBrick::Utils#create_listeners. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/webrick/server.rb | 2 +- lib/webrick/ssl.rb | 2 +- lib/webrick/utils.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/webrick/server.rb b/lib/webrick/server.rb index 4aafd1e7fe..f1f0d81fdf 100644 --- a/lib/webrick/server.rb +++ b/lib/webrick/server.rb @@ -130,7 +130,7 @@ module WEBrick # WEBrick::Utils::create_listeners for details. def listen(address, port) - @listeners += Utils::create_listeners(address, port, @logger) + @listeners += Utils::create_listeners(address, port) setup_shutdown_pipe end diff --git a/lib/webrick/ssl.rb b/lib/webrick/ssl.rb index 19c1e104da..b69a836f5d 100644 --- a/lib/webrick/ssl.rb +++ b/lib/webrick/ssl.rb @@ -149,7 +149,7 @@ module WEBrick # Updates +listen+ to enable SSL when the SSL configuration is active. def listen(address, port) # :nodoc: - listeners = Utils::create_listeners(address, port, @logger) + listeners = Utils::create_listeners(address, port) if @config[:SSLEnable] unless ssl_context @ssl_context = setup_ssl_context(@config) diff --git a/lib/webrick/utils.rb b/lib/webrick/utils.rb index 606ede5ac3..5be4db8c0d 100644 --- a/lib/webrick/utils.rb +++ b/lib/webrick/utils.rb @@ -63,7 +63,7 @@ module WEBrick # Creates TCP server sockets bound to +address+:+port+ and returns them. # # It will create IPV4 and IPV6 sockets on all interfaces. - def create_listeners(address, port, logger=nil) + def create_listeners(address, port) unless port raise ArgumentError, "must specify port" end -- cgit v1.2.3