summaryrefslogtreecommitdiff
path: root/lib/singleton.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-02 16:45:35 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-10-02 16:45:35 +0000
commit29cef5f795043a048a58874d90de0dfe01aa12ea (patch)
tree6ae42a518c1c5705b8f097668d2b83413da0b6ec /lib/singleton.rb
parent8815306dc5aadd777c887bbd8de7057598ad709c (diff)
use Object#class instead of deprecated Object#type.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/singleton.rb')
-rw-r--r--lib/singleton.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/singleton.rb b/lib/singleton.rb
index d34853702f..3c20c13253 100644
--- a/lib/singleton.rb
+++ b/lib/singleton.rb
@@ -76,7 +76,7 @@ module Singleton
def included(klass)
# remove build in copying methods
klass.class_eval do
- define_method(:clone) {raise TypeError, "can't clone singleton #{self.type}"}
+ define_method(:clone) {raise TypeError, "can't clone singleton #{self.class}"}
end
# initialize the ``klass instance variable'' @__instance__ to nil
@@ -200,7 +200,7 @@ Thread.abort_on_exception = false
class Ups < SomeSingletonClass
def initialize
- type.__sleep
+ self.class.__sleep
puts "initialize called by thread ##{Thread.current[:i]}"
end
class << self