Files
jenz 08c03ac533
CI / Build (clang, clang++, ubuntu-22.04, linux, 3.10, master, x86,x86_64) (push) Canceled after 0s
CI / Build (clang, clang++, windows-2022, windows, 3.10, master, x86,x86_64) (push) Canceled after 0s
CI / Release (push) Canceled after 0s
first commit
2026-09-13 22:18:11 +01:00

11 lines
214 B
Ruby

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