Irb state dump as ruby code

Hi all,

I don't know if this is possible, however I believe ruby is a reflective
programming language, and so I was wondering if anyone know how I might
dump an interactive ruby session as ruby code.

So say for instance I was typing away in irb and just about to finish,
but I'd like to save my brilliant work as ruby code which I could source
in or edit later on.

I would sincerely appreciate any help you can give me on this. I hope to
use this in a project I am trying to develop.

Regards
Michael

···

--
Posted via http://www.ruby-forum.com/.

IRB::ReadlineInputMethod::HISTORY.to_a.join("\n")

martin

···

On Thu, May 3, 2012 at 5:00 PM, Michael M. <lists@ruby-forum.com> wrote:

Hi all,

I don't know if this is possible, however I believe ruby is a reflective
programming language, and so I was wondering if anyone know how I might
dump an interactive ruby session as ruby code.