From: Peter Versteegen Date: 2007-07-10T01:06:07+09:00 Subject: Re: Programming habit --Apple-Mail-3--468466604 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Thanks for the prompt answer. I added the require statements and tried with and without the gems requirement but it still did not give me the expected out put for 42., using Tab as a word or as the key stroke. I put a puts statement in the .irbc file to show that Irb reads that file. I get the ?> prompt asking for some other input. Any other ideas? The q worked just fine. Thanks. Pete -------------------------------------- pversteegen@gcnetmail.net On Jul 9, 2007, at 10:53 AM, Rob Biedenharn wrote: > > On Jul 9, 2007, at 10:35 AM, Peter Versteegen wrote: > >> Hi, >> >> I'm relatively new to Ruby and haven't programmed in a while and >> am trying to get back into a good programming habit. >> >> In the reference: http://www.caliban.org/ruby/rubyguide.shtml#ri >> >> it states that, in irb, if you do 42. you get a list of all >> the methods that pertain to the class 42, a very useful function, >> except that it doesn't work on my system (Mac OS 10.4.10, and ruby >> 1.8.6 and irb 0.9.5(05/04/13) -- Note the date on irb!) >> >> Also, when I do ri I get a list that ends with (END). I can't >> find a clean exit from it (ctrl z seems to be the only thing that >> works), but it leaves, using ps, a suspended process. >> >> How can I cleanup all of this? >> >> Thanks. >> >> Pete Versteegen >> ----------------------- >> pversteegen@gcnetmail.net > > Put these lines into a file .irbrc in your home directory > > require 'rubygems' > require 'irb/completion' > > You could also just type them into your irb session to try them out. > > The "END" in ri's output is actually a prompt from the pager > "less" (in all likelihood if you've not changed it). You should be > able to get out with 'q'. See `man less` or type 'h' instead of > 'q'. You can also tell ri to send output directly rather than > through a pager like less with a '-T' option, for example: ri -T > File.exist? > > -Rob > > Rob Biedenharn http://agileconsultingllc.com > Rob@AgileConsultingLLC.com > > > > --Apple-Mail-3--468466604--