John Joyce
10/15/2007 2:16:00 AM
On Oct 14, 2007, at 8:20 PM, Grant Hutchins wrote:
> On Oct 14, 4:08 pm, John Joyce <dangerwillrobinsondan...@gmail.com>
> wrote:
>> Here's an interesting thing you can do in irb:
>> irb
>>
>> You can run an instance of irb within irb. How very Ruby!?
>> In irb you can also do this:
>>
>> methods
>>
>> (or my preferred approach...)
>> methods.sort
>>
>> irb itself has some interesting abilities.
>
> Also you can do irb(object) and then you will be executing code in the
> context of that object. In other words, you can jump into a class and
> define an instance method on it directly, or jump into an instance and
> toy around with its methods and instance variables all within its
> context. Ctrl-D kicks you back out to the parent irb instance.
>
>
There must be a way to jump in and out, leaving it running or not.
For example, start irb.
Then, create two named irb sessions inside it.
You operate at the top level, monitor the two inside irb's...