From: Mark Carter Date: 2009-10-19T23:20:06+09:00 Subject: Re: Send last irb output to Windows clipboard ghorner wrote: > On Oct 19, 6:32 am, Mark Carter wrote: >> Ruby n00b here. >> >> What I'd like to do is create a command that, when invoked, copies the >> last output of irb to the Windows clipboard. How do I do this? > > gem install win32/clipboard > > def copy_last_output > Win32::Clipboard.set_data IRB.CurrentContext.last_value > end Wow. Neat. Thanks.