提交 072cd603 编写于 作者: A Aaron Patterson

refactor if / else to ||=

上级 5a1d957d
......@@ -93,11 +93,7 @@ def initialize(spec)
# #connection can be called any number of times; the connection is
# held in a hash keyed by the thread id.
def connection
if conn = @reserved_connections[current_connection_id]
conn
else
@reserved_connections[current_connection_id] = checkout
end
@reserved_connections[current_connection_id] ||= checkout
end
# Signal that the thread is finished with the current connection.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册