From 60b1cd8e534851eafc498c51679b863de407c6b0 Mon Sep 17 00:00:00 2001 From: Patrick Mahoney Date: Wed, 1 Feb 2012 21:43:53 -0600 Subject: [PATCH] Add (again) default semaphore value; all tests passing on Linux. --- lib/process_shared/posix/semaphore.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/process_shared/posix/semaphore.rb b/lib/process_shared/posix/semaphore.rb index a1ef3a5..e72d1a6 100644 --- a/lib/process_shared/posix/semaphore.rb +++ b/lib/process_shared/posix/semaphore.rb @@ -55,7 +55,7 @@ module ProcessShared # resort). # # @param [Integer] value the initial semaphore value - def initialize(value) + def initialize(value = 1) @sem = SharedMemory.new(LibC.type_size(:sem_t)) sem_init(@sem, 1, value) ObjectSpace.define_finalizer(self, self.class.make_finalizer(@sem))