Compare commits

...

3 Commits

Author SHA1 Message Date
rulingcom 0830746bf8 Bump version to 0.2.2 2024-03-02 16:35:11 +08:00
rulingcom c3405dcb69 Fix bug. 2024-03-02 16:25:49 +08:00
rulingcom 13c1e5f129 Fix bug. 2024-03-02 16:17:22 +08:00
3 changed files with 7 additions and 5 deletions

View File

@ -1 +1,2 @@
0.2.1 0.2.2

View File

@ -26,9 +26,10 @@ module ProcessShared
# #
# Fallback to attempting to load from same directory as this file. # Fallback to attempting to load from same directory as this file.
helper = 'process_shared/posix/helper.' + suffix helper = 'process_shared/posix/helper.' + suffix
fallback_path = File.expand_path(File.dirname(__FILE__)) gem_spec = Gem::Specification.find_all.find{|g| g.name == 'process_shared'}
path = $LOAD_PATH.find(fallback_path) do |path| path = gem_spec.extensions_dir
File.exist?(File.join(path, helper)) unless path.end_with?(gem_spec.full_name)
path = File.join(path, gem_spec.full_name)
end end
if defined?(Truffle) if defined?(Truffle)

View File

@ -47,7 +47,7 @@ module ProcessShared
# #
# @return [Proc] a finalizer # @return [Proc] a finalizer
def self.make_finalizer(sem) def self.make_finalizer(sem)
proc { LibC.shm_unlink(sem) } proc { SharedMemory::Foreign.shm_unlink(sem) }
end end
# Create a new semaphore with initial value +value+. After # Create a new semaphore with initial value +value+. After