1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/webrick] Do not use ensure in a block without begin

This syntax is not supported until Ruby 2.5, and Webrick still
targets Ruby 2.3+.

https://github.com/ruby/webrick/commit/fbe85b885f
This commit is contained in:
Jeremy Evans 2020-07-15 09:04:52 -07:00 committed by Hiroshi SHIBATA
parent 96da24f279
commit d969cf6059

View file

@ -104,6 +104,7 @@ class WEBrick::TestFileHandler < Test::Unit::TestCase
bug2593 = '[ruby-dev:40030]'
TestWEBrick.start_httpserver(config) do |server, addr, port, log|
begin
server[:DocumentRootOptions][:NondisclosureName] = []
http = Net::HTTP.new(addr, port)
req = Net::HTTP::Get.new("/")
@ -182,6 +183,7 @@ class WEBrick::TestFileHandler < Test::Unit::TestCase
server[:DocumentRootOptions].delete :NondisclosureName
end
end
end
def test_non_disclosure_name
config = { :DocumentRoot => File.dirname(__FILE__), }