Skip to content

Commit

Permalink
Fixed double assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Oct 1, 2024
1 parent 6780da5 commit 9d3c77a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/singleton.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ def _load(str)
end

def instance # :nodoc:
@singleton__instance__ || @singleton__mutex__.synchronize { @singleton__instance__ ||= set_instance(new) }
@singleton__instance__ || @singleton__mutex__.synchronize { @singleton__instance__ ||= new }
end

private
Expand Down

0 comments on commit 9d3c77a

Please sign in to comment.