On Sat, 2004-08-28 at 12:55, Lothar Scholz wrote:
> a huge problem is that copying code fragments into IRB is easy but
> if you want to get some code you typed in IRB multiple lines) getting
> this back to the editor is much more difficult.

Try "irb --noprompt".

To me, the biggest problem with using irb in this mode is the "set up
some context" part. 

Believe it or not, but it is quite easy to do with Eclipse/Java: one can
set a breakpoint, execute some test, wait till debugger stops on the
breakpoint, and then use Eclipse "Display" view to evaluate arbitrary
Java expressions in the current scope.

So far, I don't know any easy way to do the same with Ruby, so I end up
inserting things like "puts <expression>.inspect" and rerunning the
test. Which is not as nice as an interactive shell. Does anyone have a
better way?

Alex