Skip to content

Commit 3e9116b

Browse files
committed
JRuby - fix
1 parent 8fa3f05 commit 3e9116b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/concurrent/atomic/semaphore.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def reduce_permits(reduction)
210210
unless reduction.is_a?(Fixnum) && reduction >= 0
211211
fail ArgumentError, 'reduction must be an non-negative integer'
212212
end
213-
unless @free - reduction >= 0
213+
unless @semaphore.available_permits - reduction >= 0
214214
fail(ArgumentError,
215215
'cannot reduce number of available_permits below zero')
216216
end

0 commit comments

Comments
 (0)