On Mon, 21 May 2001, Yukihiro Matsumoto wrote:
> In message "[ruby-talk:15466] Re: more reflection"
>     on 01/05/21, Mathieu Bouchard <matju / sympatico.ca> writes:
> |> Oops...  singleton_methods do the job for most of the cases,
> |> unless you really want to know existance of empty singleton
> |> class, which usually can be ignored.
> |Such "empty" singleton classes could be ignored if it weren't for
> |foo.extend Bar, or class<<foo; include Bar; end, isn't it?
> 
> Yes.  This might be a misfeature.  Methods in Bar can be considered as
> singleton methods.  Should they?

Well, if I expect:

	foo.singleton_methods

to mean:

	(class<<foo;self;end).instance_methods

then not only methods of Bar must *not* appear in the latter expression,
but they *must* appear in this one:

	foo.singleton_methods(true)

which should be doing like:

	(class<<foo;self;end).instance_methods(true)

instead of whining like:

	#<ArgumentError: (eval):1:in `singleton_methods': wrong # of
	arguments(1 for 0)>

matju