Project

General

Profile

Actions

Bug #12131

closed

Should defining singleton_method_added call itself?

Added by Eregon (Benoit Daloze) almost 9 years ago. Updated over 5 years ago.

Status:
Closed
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
Actions

Also available in: Atom PDF

Like0
Like0Like0