properly clone the Singleton pattern - did you know that duping doesn‘t copy class methods?
[Source]
# File lib/singleton.rb, line 130 130: def clone 131: Singleton.__init__(super) 132: end
waiting-loop hook
# File lib/singleton.rb, line 147 147: def _instantiate?() 148: while false.equal?(@__instance__) 149: Thread.critical = false 150: sleep(0.08) # timeout 151: Thread.critical = true 152: end 153: @__instance__ 154: end
# File lib/singleton.rb, line 142 142: def _load(str) 143: instance 144: end
ensure that the Singleton pattern is properly inherited
# File lib/singleton.rb, line 137 137: def inherited(sub_klass) 138: super 139: Singleton.__init__(sub_klass) 140: end
[Validate]