blob: 33612155fb64938420d1c71f5c92b58aafa6f113 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
module Kernel
# Returns the object's singleton class.
def singleton_class
class << self
self
end
end unless respond_to?(:singleton_class) # exists in 1.9.2
# class_eval on an object acts like singleton_class.class_eval.
def class_eval(*args, &block)
singleton_class.class_eval(*args, &block)
end
end
|