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
dummier question: Now, how do I load a (script) file to irb (history)?
My initial wants:
- I’d like to load & unload scripts in irb.
- I’d like/dream to combine irb, -rdebug, and ri together…
liken to what Chad said, I’d like a textual ide 
kind regards -botp
dummier question: Now, how do I load a (script) file to irb (history)?
My initial wants:
- I’d like to load & unload scripts in irb.
Hmm, I’ve seen posts on how to run a script and then have
it stop in irb so you could continue interactively. I don’t
know where, just do a google search. It should not be hard
to find.
- I’d like/dream to combine irb, -rdebug, and ri together…
I’ve also seen ri added to irb. Of course, you could add a simple
function to .irbrc like this
def ri(query)
puts ri #{query}
end
then just do
ri “Array.shift”
liken to what Chad said, I’d like a textual ide 
You may want to search for what has been done with
vim and emacs.
···
On Monday, 31 March 2003 at 12:05:23 +0900, “Peña, Botp” wrote:
–
Jim Freeze
Vote for ME – I’m well-tapered, half-cocked, ill-conceived and
TAX-DEFERRED!
dummier question: Now, how do I load a (script) file to irb (history)?
Try:
def loadhist(path)
File.open(path) do |io|
io.each do |line|
Readlines::HISTORY << line
end
end
end
I don’t know if that will work, or if it’s even possible.
My initial wants:
- I’d like to load & unload scripts in irb.
Hmm, I’ve seen posts on how to run a script and then have
it stop in irb so you could continue interactively. I don’t
know where, just do a google search. It should not be hard
to find.
That’s a dead end, AFAIK. You can’t really interact with your program
much - no local variables. For anyone who’s interested, though, it’s
worth a try for yurself; you may find something interesting.
- I’d like/dream to combine irb, -rdebug, and ri together…
[…]
liken to what Chad said, I’d like a textual ide 
You may want to search for what has been done with
vim and emacs.
I’d like what Botp wants as well. Vim and emacs have some potential,
but FreeRIDE is more likely, just because it’s the focal point of
efforts to produce IDE functionality. It’s a shame that the editor
must be implemented when there are two great ones right there, but
that’s life. Vim and emacs both have very impractical “extension”
languages.
Gavin
···
On Monday, March 31, 2003, 2:33:07 PM, Jim wrote:
On Monday, 31 March 2003 at 12:05:23 +0900, “Peña, Botp” wrote: