summaryrefslogtreecommitdiff
path: root/lib/singleton.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-02-29 08:05:32 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-02-29 08:05:32 +0000
commit4890f3a684aff94d93a5cc3f68fa8c67c1da6c19 (patch)
tree3e43148d3114380fff1418aa3ff6d01b157a97e4 /lib/singleton.rb
parent0c123a83f0446204d974318b578236c949e5a01f (diff)
2000-02-29
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/singleton.rb')
-rw-r--r--lib/singleton.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/singleton.rb b/lib/singleton.rb
index 2785c77..235ba89 100644
--- a/lib/singleton.rb
+++ b/lib/singleton.rb
@@ -16,8 +16,8 @@ module Singleton
klass.instance_eval %{
@__instance__ = nil
def instance
+ Thread.critical = true
unless @__instance__
- Thread.critical = true
begin
@__instance__ = new
ensure