Project

General

Profile

Bug #12131

Should defining singleton_method_added call itself?

Added by Eregon (Benoit Daloze) about 1 year ago.

Status:
Open
Priority:
Normal
Assignee:
-
Target version:
-
ruby -v:
ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
[ruby-core:74081]

Description

This seems surprising:

obj = Object.new
def obj.singleton_method_added(n)
  p n
end
def obj.new_singleton_method; end

outputs

:singleton_method_added
:new_singleton_method

Also available in: Atom PDF