mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/singleton.rb (SingletonClassMethods): _load should be public.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e0029988fb
commit
4f4ab5e230
2 changed files with 35 additions and 31 deletions
|
@ -1,3 +1,7 @@
|
|||
Wed May 28 15:18:16 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/singleton.rb (SingletonClassMethods): _load should be public.
|
||||
|
||||
Wed May 28 12:52:41 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* marshal.c (w_object, marshal_dump, r_object0, marshal_load): search
|
||||
|
|
|
@ -131,6 +131,10 @@ class << Singleton
|
|||
Singleton.__init__(super)
|
||||
end
|
||||
|
||||
def _load(str)
|
||||
instance
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
# ensure that the Singleton pattern is properly inherited
|
||||
|
@ -139,10 +143,6 @@ class << Singleton
|
|||
Singleton.__init__(sub_klass)
|
||||
end
|
||||
|
||||
def _load(str)
|
||||
instance
|
||||
end
|
||||
|
||||
# waiting-loop hook
|
||||
def _instantiate?()
|
||||
while false.equal?(@__instance__)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue