When running the following ruby script:
puts gets.inspect
On the terminal I am prompted for input and then the inspect
output is sh
See this blog entry; presumably you're on Snow Leopard?
From the comments, some users say that this file has worked for them on Snow Leopard. Per @dmarkow's answer, copy this file to:
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/
You may want to keep a copy of the file around as updates to TextMate may replace it.
Specifically, you need to copy the tm_interactive_input.dylib file linked to by Phrogz in the following path:
/Applications/TextMate.app/Contents/SharedSupport/Support/lib/tm_interactive_input.dylib
Keep in mind that it's possible any TextMate updates will overwrite or delete this file.