Ruby 3.3 リファレンスマニュアル

instance method UnboundMethod#owner

owner -> Class | Module[permalink][rdoc][edit]

このメソッドが定義されている class か module を返します。


p Integer.instance_method(:to_s).owner # => Integer
p Integer.instance_method(:to_c).owner # => Numeric
p Integer.instance_method(:hash).owner # => Kernel