Skip to content

Commit

Permalink
Silence "instance variable @db not initialized" warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ikaronen-relex authored and SamSaffron committed Aug 31, 2023
1 parent 8a94421 commit 574c3be
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/mini_mime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def binary?

class Db
LOCK = Mutex.new
@db = nil

def self.db
@db || LOCK.synchronize { @db ||= new }
Expand Down

0 comments on commit 574c3be

Please sign in to comment.