Instance Methods
#
3.5
View on GitHub
# File tmp/rubies/ruby-3.5.0-preview1/lib/singleton.rb, line 99
def clone
raise TypeError, "can't clone instance of singleton #{self.class}"
end
Raises a TypeError to prevent cloning.
3.5
View on GitHub
# File tmp/rubies/ruby-3.5.0-preview1/lib/singleton.rb, line 109
def _dump(depth = -1)
''
end
By default, do not retain any state when marshalling.
#
3.5
View on GitHub
# File tmp/rubies/ruby-3.5.0-preview1/lib/singleton.rb, line 104
def dup
raise TypeError, "can't dup instance of singleton #{self.class}"
end
Raises a TypeError to prevent duping.