summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-method/mrblib/kernel.rb
blob: b2ebd45eacecf3da443617ab034edb74d7fb1131 (plain)
1
2
3
4
5
6
7
8
9
module Kernel
  def singleton_method(name)
    m = method(name)
    if m.owner != singleton_class
      raise NameError, "undefined method `#{name}' for class `#{singleton_class}'"
    end
    m
  end
end