From: Trans Date: 2006-12-22T07:04:01+09:00 Subject: Re: Method named ***(other) Luciano Ramalho wrote: > I was just wondering whether there is a way, via introspection, to > fetch that list programmatically from Ruby, short of inspecting the > source code for the interpreter. More or less. h = [] ObjectSpace.each_object(Class){|c| h |= c.public_instance_methods.select{|m| m =~ /^\W/} h |= c.private_instance_methods.select{|m| m =~ /^\W/} } ObjectSpace.each_object(Module){|c| h |= c.public_instance_methods.select{|m| m =~ /^\W/} h |= c.private_instance_methods.select{|m| m =~ /^\W/} } p h There's probably some clever way to compute precedence too. T.