I have been recently hacking on my spare time on a new small project, called RubyInject.
As you can probably imagine from the name, it's a way to inject ruby. It comes as an Objective-C framework with only one API, [RubyInject +injectProcess:], which will thanks to the excellent mach_star stuff inject a small bundle in the given process, start a new thread, initialize a Ruby interpreter, and start a DRb local server. You can then remotely evaluate expressions from another Ruby process. The DRb local server URI is advertised on Bonjour if you have the Ruby DNSSD library installed, which makes the potential clients easier to connect.
The project comes with an inject.rb script that takes a pid and optionally a Ruby script that will be remotely executed. If no Ruby script is given, an IRB session is started instead and allows you to interactively talk with the application. There is also an example that transforms the first TextEdit window as a Ruby evaluator.
Get the code! It's covered by the Creative Commons Attribution 2.0 Generic, which is the same license the mach_star bits are also covered by (I wanted to make it simple).
svn co https://rubycocoa.svn.sourceforge.net/svnroot/rubycocoa/branches/users/lrz/RubyInject
It requires RubyCocoa trunk to work. This was the first time I started RubyCocoa not in the main thread, and there were some problems with the code that redirects calls from other threads to the thread where RubyCocoa was initialized. We need this facility because Ruby 1.8 isn't thread-safe, sigh :-(