I’m trying to start IRB and run a file, foo.rb, in one command,
irb foo.rb
When foo.rb is done I want another IRB prompt. Instead, it prints an IRB prompt, then exits.
I checked the IRB docs and I changed IRB.conf[:IGNORE_EOF] = true. I confirmed that hash value inside IRB. Is the behavior I want set by this hash? If so, what else could I be doing wrong?
The docs for
irbsay about that configuration:So, no that setting isn’t meant to do what you’re looking for. As far as I can tell, there isn’t a way to do what you want with
irb. The closest would be to startirbwithout an argument, then userequire './foo.rb'to run that file.