mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
8815306dc5
commit
29cef5f795
22 changed files with 91 additions and 93 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue