We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e132eef commit 88c33cdCopy full SHA for 88c33cd
lib/concurrent/atomic/java_count_down_latch.rb
@@ -9,9 +9,8 @@ class JavaCountDownLatch
9
10
# @!macro count_down_latch_method_initialize
11
def initialize(count = 1)
12
- unless count.is_a?(Fixnum) && count >= 0
13
- raise ArgumentError.new('count must be in integer greater than or equal zero')
14
- end
+ Utility::NativeInteger.ensure_integer_and_bounds(count)
+ Utility::NativeInteger.ensure_positive(count)
15
@latch = java.util.concurrent.CountDownLatch.new(count)
16
end
17
0 commit comments