A shot at implementing a REPL-like feature for vim (and everything else able to write to text files).
sudo gem install --no-wrappers soma
vimirb
When you start IRB Soma will listen on a file named $TMPDIR/$USER_somarepl_buffer
and execute everything added there in your IRB session.
Copy plugins/soma.vim
to ~/.vim/plugin/
. The default mapping is Ctrl-c Ctrl-c
, which sends the current paragraph or visual selection to IRB.