Skip to content

Commit 0998bb7

Browse files
committed
Fix timeout deprecation on recent rubies
* Use Timeout.timeout, not Object#timeout
1 parent bc7b147 commit 0998bb7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/webmachine/spec/adapter_lint.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
let(:client) do
2323
client = Net::HTTP.new(application.configuration.ip, port)
2424
# Wait until the server is responsive
25-
timeout(5) do
25+
Timeout.timeout(5) do
2626
begin
2727
client.start
2828
rescue Errno::ECONNREFUSED

spec/webmachine/adapters/reel_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
def reel_server(adptr = adapter)
5757
thread = Thread.new { adptr.run }
5858
begin
59-
timeout(5) do
59+
Timeout.timeout(5) do
6060
begin
6161
sock = TCPSocket.new(adptr.application.configuration.ip, adptr.application.configuration.port)
6262
begin

0 commit comments

Comments
 (0)