提交 4ae48289 编写于 作者: A Aaron Patterson

backporting a couple missing files. sorry folks!

上级 f57ca877
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
class Module
def remove_possible_method(method)
remove_method(method)
rescue NameError
end
end
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册