Skip to content

Commit f961df8

Browse files
committed
Merge pull request #664 from cbandy/uninitialized-timeout
Uninitialized constant Mysql2::Client::Timeout
2 parents 6c64816 + 709c83d commit f961df8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/mysql2/client.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,10 @@ def self.default_query_options
8080
end
8181

8282
if Thread.respond_to?(:handle_interrupt)
83+
require 'timeout'
84+
8385
def query(sql, options = {})
84-
Thread.handle_interrupt(Timeout::ExitException => :never) do
86+
Thread.handle_interrupt(::Timeout::ExitException => :never) do
8587
_query(sql, @query_options.merge(options))
8688
end
8789
end

0 commit comments

Comments
 (0)