RubyInject is an intriguing new tool that can “inject” a Ruby interpreter into any running OS X application. Why? Well, along with RubyCocoa it allows you to interact with an application “from the inside.” If you’re a RubyCocoa aficionado you can probably think of a few cute tricks to use this for already. If not, then just think about AppleScript on acid. All of this fun and games does require OS X 10.5 (Leopard), however.
Source: Ruby Inside