--CC5qiHV/f0UkyWC4 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable gminick (gminick / underground.org.pl) wrote: > Just take a look: > I want to take a look at methods for quit or exit with irb: > > % irb > Reading config file... done. > ruby-1.7.3 on i586-pc-linux with irb 0.9(02/07/03) > Type 'info' for more information. Feel free to use help(anObject) ;] > >>> quit.methods > Time spent with irb: 00:00:08. > % _ > > For me it looks like an unwanted behavior. > > % cat >rb.rb <<EOF > a = exit.methods > a.each { |x| puts x } > EOF > % ruby rb.rb > % _ > > It prints nothing. > Either, exit and quit, aren't objects for me anymore ;) exit and quit aren't objects, they're methods. What you're doing is invoking them. You probably want: irb(main):003:0> Object.method(:exit).methods ["to_s", "unbind", "[]", "to_proc", "clone", "inspect", "arity", "call", "==", "public_methods", "taint", "equal?", "===", "method", "kind_of?", "display", "instance_eval", "to_a", "type", "private_methods", "freeze", "id", "extend", "=~", "eql?", "singleton_methods", "tainted?", "is_a?", "methods", "dup", "nil?", "class", "instance_of?", "instance_variables", "send", "frozen?", "__id__", "__send__", "untaint", "respond_to?", "hash", "protected_methods"] irb(main):004:0> -- Eric Hodel - drbrain / segment7.net - http://segment7.net All messages signed with fingerprint: FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04 --CC5qiHV/f0UkyWC4 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.0 (FreeBSD) iD8DBQE9xt/nMypVHHlsnwQRApAuAJ9cpj/EvSPYkKZuM58SvrORzovDbACg3/Im lKl0k8iGeviEG2yoTZYs1ZYI -----END PGP SIGNATURE----- --CC5qiHV/f0UkyWC4--