summaryrefslogtreecommitdiff
path: root/lib/singleton.rb
diff options
context:
space:
mode:
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