File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 9292# p a.strip # => nil
9393#
9494module Singleton
95+ # The version string
9596 VERSION = "0.3.0"
9697
97- module SingletonInstanceMethods
98+ module SingletonInstanceMethods # :nodoc:
9899 # Raises a TypeError to prevent cloning.
99100 def clone
100101 raise TypeError , "can't clone instance of singleton #{ self . class } "
@@ -143,11 +144,11 @@ def set_mutex(val)
143144 end
144145 end
145146
146- def self . module_with_class_methods
147+ def self . module_with_class_methods # :nodoc:
147148 SingletonClassMethods
148149 end
149150
150- module SingletonClassProperties
151+ module SingletonClassProperties # :nodoc:
151152
152153 def self . included ( c )
153154 # extending an object with Singleton is a bad idea
@@ -196,10 +197,10 @@ def included(klass)
196197end
197198
198199if defined? ( Ractor )
199- module RactorLocalSingleton
200+ module RactorLocalSingleton # :nodoc:
200201 include Singleton ::SingletonInstanceMethods
201202
202- module RactorLocalSingletonClassMethods
203+ module RactorLocalSingletonClassMethods # :nodoc:
203204 include Singleton ::SingletonClassMethods
204205 def instance
205206 set_mutex ( Thread ::Mutex . new ) if Ractor . current [ mutex_key ] . nil?
You can’t perform that action at this time.
0 commit comments