[ruby-core:74081] [Ruby trunk Bug#12131] Should defining singleton_method_added call itself?

From: eregontp@...
Date: 2016-03-01 10:40:01 UTC
List: ruby-core #74081
Issue #12131 has been reported by Benoit Daloze.

----------------------------------------
Bug #12131: Should defining singleton_method_added call itself?
https://bugs.ruby-lang.org/issues/12131

* Author: Benoit Daloze
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux]
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
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
~~~



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>

In This Thread

Prev Next