Skip to content

Commit 88c33cd

Browse files
committed
Fix Fixnum warning
1 parent e132eef commit 88c33cd

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/concurrent/atomic/java_count_down_latch.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ class JavaCountDownLatch
99

1010
# @!macro count_down_latch_method_initialize
1111
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
12+
Utility::NativeInteger.ensure_integer_and_bounds(count)
13+
Utility::NativeInteger.ensure_positive(count)
1514
@latch = java.util.concurrent.CountDownLatch.new(count)
1615
end
1716

0 commit comments

Comments
 (0)