"methods" method

Thanks, that’s what I want… I wrote a small program to find out methods in
an object’s hierachy. I think it may be used for auto-completion. RDE’s
auto-completion is IMHO not as good as delphi’s…

Shannon

···

From: nobu.nokada@softhome.net
Reply-To: ruby-talk@ruby-lang.org
To: ruby-talk@ruby-lang.org (ruby-talk ML)
Subject: Re: “methods” method
Date: Thu, 5 Dec 2002 20:34:38 +0900

Hi,

At Thu, 5 Dec 2002 19:54:50 +0900, >Shannon Fang wrote:

I tried String.methods-Kernel.methods in irb, found that most methods
of String are inherited from Kernel. I don’t know for methods like
sub, gsub, split, strip, chomp… Are they String specific? Why they
exist in Kernel?

Note that String.methods returns singleton methods of String.

I imagine what you really want is:
String.instance_methods-Kernel.instance_methods


Nobu Nakada


The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail