Skip to content

Commit e946233

Browse files
committed
Handle nil in ConnectionPool::WeakThreadKeyMap
1 parent 783108d commit e946233

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def [](key)
133133
end
134134

135135
def []=(key, value)
136-
@map.select! { |c, _| c.alive? }
136+
@map.select! { |c, _| c&.alive? }
137137
@map[key] = value
138138
end
139139
end

0 commit comments

Comments
 (0)