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:
parent
96da24f279
commit
d969cf6059
1 changed files with 71 additions and 69 deletions
|
@ -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__), }
|
||||
|
|
Loading…
Reference in a new issue