Skip to content

Commit

Permalink
Merge pull request #13 from ruby/fix-double-assign
Browse files Browse the repository at this point in the history
Fixed double assignment
  • Loading branch information
hsbt authored Oct 2, 2024
2 parents 6780da5 + 9d3c77a commit 29d8acb
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 29d8acb

Please sign in to comment.