On Sunday, 30 March 2003 at 22:41:20 +0900, Gavin Sinclair wrote:
> 
> Done it.  Put this in your ~/.irbrc
> 
>   # Output irb history to named file
>   def dumphist(path)
>     File.open(path, 'w') do |file|
>       Readline::HISTORY.each do |line|
>           file.puts line
>       end
>     end
>   end
> 

Wow. Thanks Gavin. If I may, I have modified your code just
a little:

# Output irb history to named file
def dumphist(path="irb.log")
  File.open(path, 'w') do |file|
    Readline::HISTORY.each do |line|
      file.puts line unless /^\s*dumphist/ =~ line
    end
  end
end

I've added a default log and I have excluded recording
of the dumphist command. Both of these are personal preference.

Thanks for the code!

-- 
Jim Freeze
----------
Join in the new game that's sweeping the country.  It's called
"Bureaucracy".  Everybody stands in a circle.  The first person to do
anything loses.