From: Gavin Sinclair Date: 2003-04-01T00:16:16+09:00 Subject: Re: Saving code written during an irb session On Tuesday, April 1, 2003, 12:29:12 AM, Chris wrote: >> # 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 > Is Readline a 1.8 thing? No, more likely a platform thing. What are you using? All the same, I expect you can do require 'readline' in IRB. Perhaps, for some reason, your IRB is not doing that itself, which is what the dumphist code relies on. Gavin