From: "trans. (T. Onoma)" Date: 2004-10-01T22:09:44+09:00 Subject: Re: irb: a great tool in it's own right On Friday 01 October 2004 07:17 am, Kaspar Schiess wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > rcoder@gmail.com wrote: > | Yup -- it's like a shell with (*gasp*) intelligent handling of > | intermediate results like lists of filenames. At times, I've even > | defined a 'method_missing' in my irb toplevel which just calls 'system' > | to invoke a command, rather than method, which makes irb even more > | shell-like. Of course, you still have to pass arguments to those > | commands as an array of strings, but I've found that %w{ ... } works > | well. > > Just in case anyone is really interested, the def is > > ~ def method_missing( method, *args ) > ~ system method.to_s + " " + args.join(' ') > ~ end Not to be a killjoy, but can't you just type: `ls foo bar` Hmm.. actually you need a puts in front so def `(*args) puts super end T.