mutex_m 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +0 -2
  3. data/README.md +1 -1
  4. data/lib/mutex_m.rb +13 -14
  5. data/mutex_m.gemspec +1 -0
  6. metadata +4 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 90b564c7decd5c539896cab3c66cee8f4b382ede5115f2e92ddd7dc687a2183c
4
- data.tar.gz: 40ae6ead9b75d6ae11cb751f2529d66b25fef5b849168b9b464c0a372258b606
3
+ metadata.gz: 88572cf91c2e6eb6f9c5152967666b5253a2edad27a0a3a97fd06515f85de11f
4
+ data.tar.gz: 0c1bb10f5fc6fcf7dc30721aae8d9b70e4cbb74f92286a86bb3af0a1e5e6041a
5
5
  SHA512:
6
- metadata.gz: 51bc30b53aa511090296a06ec98264070d675b78bb5aaaed8cc97334b12596237e7c8db43a14b717d49a048c87d5d436beab9b5ebeca6035c1de90a265bf4c93
7
- data.tar.gz: 7fcf7827ed18774ca1470fe299113487bc87e643141fb381213882b6e410592545368484476498cafaa80332917ddcad4eeb903daed1010b0a49c72470bedb76
6
+ metadata.gz: a879eccfb2a6acd4997fac6fc3d2217129a405363d0442ad4274ec917106ecfa0c4221fa9d13c1e965c5c1ecd9e77b38f883d4fc59659575c33095dba7800912
7
+ data.tar.gz: 690a40841f4e9fc43ae58f4750a30ecabc173e2416d3bb0cdd070377d0025e8a83fc5c762d0a6c43aeaae048382fe789874c7d77ad8d697063aca0090f744eaf
data/Gemfile CHANGED
@@ -1,5 +1,3 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
-
5
3
  gemspec
data/README.md CHANGED
@@ -23,7 +23,7 @@ Or install it yourself as:
23
23
  Start by requiring the standard library Mutex_m:
24
24
 
25
25
  ```ruby
26
- require "mutex_m.rb"
26
+ require "mutex_m"
27
27
  ```
28
28
 
29
29
  From here you can extend an object with Mutex instance methods:
data/lib/mutex_m.rb CHANGED
@@ -40,16 +40,15 @@
40
40
  #
41
41
  module Mutex_m
42
42
 
43
- VERSION = "0.1.1"
43
+ VERSION = "0.2.0"
44
+ Ractor.make_shareable(VERSION) if defined?(Ractor)
44
45
 
45
46
  def Mutex_m.define_aliases(cl) # :nodoc:
46
- cl.module_eval %q{
47
- alias locked? mu_locked?
48
- alias lock mu_lock
49
- alias unlock mu_unlock
50
- alias try_lock mu_try_lock
51
- alias synchronize mu_synchronize
52
- }
47
+ cl.alias_method(:locked?, :mu_locked?)
48
+ cl.alias_method(:lock, :mu_lock)
49
+ cl.alias_method(:unlock, :mu_unlock)
50
+ cl.alias_method(:try_lock, :mu_try_lock)
51
+ cl.alias_method(:synchronize, :mu_synchronize)
53
52
  end
54
53
 
55
54
  def Mutex_m.append_features(cl) # :nodoc:
@@ -73,32 +72,32 @@ module Mutex_m
73
72
  mu_initialize
74
73
  end
75
74
 
76
- # See Mutex#synchronize
75
+ # See Thread::Mutex#synchronize
77
76
  def mu_synchronize(&block)
78
77
  @_mutex.synchronize(&block)
79
78
  end
80
79
 
81
- # See Mutex#locked?
80
+ # See Thread::Mutex#locked?
82
81
  def mu_locked?
83
82
  @_mutex.locked?
84
83
  end
85
84
 
86
- # See Mutex#try_lock
85
+ # See Thread::Mutex#try_lock
87
86
  def mu_try_lock
88
87
  @_mutex.try_lock
89
88
  end
90
89
 
91
- # See Mutex#lock
90
+ # See Thread::Mutex#lock
92
91
  def mu_lock
93
92
  @_mutex.lock
94
93
  end
95
94
 
96
- # See Mutex#unlock
95
+ # See Thread::Mutex#unlock
97
96
  def mu_unlock
98
97
  @_mutex.unlock
99
98
  end
100
99
 
101
- # See Mutex#sleep
100
+ # See Thread::Mutex#sleep
102
101
  def sleep(timeout = nil)
103
102
  @_mutex.sleep(timeout)
104
103
  end
data/mutex_m.gemspec CHANGED
@@ -20,6 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.bindir = "exe"
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ["lib"]
23
+ spec.required_ruby_version = '>= 2.5'
23
24
 
24
25
  spec.add_development_dependency "bundler"
25
26
  spec.add_development_dependency "rake"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mutex_m
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keiju ISHITSUKA
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-22 00:00:00.000000000 Z
11
+ date: 2023-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -78,14 +78,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - ">="
80
80
  - !ruby/object:Gem::Version
81
- version: '0'
81
+ version: '2.5'
82
82
  required_rubygems_version: !ruby/object:Gem::Requirement
83
83
  requirements:
84
84
  - - ">="
85
85
  - !ruby/object:Gem::Version
86
86
  version: '0'
87
87
  requirements: []
88
- rubygems_version: 3.2.2
88
+ rubygems_version: 3.5.0.dev
89
89
  signing_key:
90
90
  specification_version: 4
91
91
  summary: Mixin to extend objects to be handled like a Mutex.