From: "matz (Yukihiro Matsumoto)" Date: 2022-06-16T09:16:59+00:00 Subject: [ruby-core:108957] [Ruby master Bug#18729] Method#owner and UnboundMethod#owner are incorrect after using Module#public/protected/private Issue #18729 has been updated by matz (Yukihiro Matsumoto). And if I understand correctly, copying could cause the following code to print "B:B:hello", which is confusing. ```ruby class A private def foo; puts "hello"; end end class B, A, [], [:foo]] [#, A, [:foo], [:foo]] ``` So `UnboundMethod#owner` says `A`, but clearly there is a :foo method entry in B created by `public :foo`, and that is shown through `B.instance_methods(false)`. The expected output is: ``` [#, A, [], [:foo]] [#, B, [:foo], [:foo]] ``` -- https://bugs.ruby-lang.org/ Unsubscribe: