mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
19991117
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@564 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
aa6ca26e8b
commit
b1d45b805c
7 changed files with 45 additions and 19 deletions
|
@ -14,6 +14,7 @@ module Singleton
|
|||
def Singleton.append_features(klass)
|
||||
klass.private_class_method(:new)
|
||||
klass.instance_eval %{
|
||||
@__instance__ = nil
|
||||
def instance
|
||||
unless @__instance__
|
||||
@__instance__ = new
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue