first commit
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
module Kernel
|
||||
def singleton_method(name)
|
||||
m = method(name)
|
||||
sc = (class <<self; self; end)
|
||||
if m.owner != sc
|
||||
raise NameError, "undefined method '#{name}' for class '#{sc}'"
|
||||
end
|
||||
m
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user