I have two versions of Emacs on my new OS X mac. One comes with it and
is a dumb terminal version. The other runs standalone and does syntax
coloring, understands the clipboard - all that good stuff.

The first can M-x run-ruby; the second cannot.

The symptom is that when I M-x run-ruby, I get an empty buffer. The
mode line shows state "run". If I type a character, it switches to
"exit". That happens even if I switch buffers without typing anything
to the process.

Anyone figured this out already?

-------------------
Specifics: This report is for the precompiled binary I got from
<http://www.cse.cuhk.edu.hk/~akochoi/emacs/21.1/emacs-21.1-mac-bin.smi.bin>
"GNU Emacs 21.1.30.3 (powerpc-apple-darwin5.2.2) of 2002-02-10 on
localhost"
I'm running OS X 10.1.3.
The version of Ruby is 1.6.4, precompiled, from
<http://www.apple.com/downloads/macosx/unix_apps_utilities/rubyprogramminglanguage.html>

Similar programs seem to work. By giving a numeric argument to
run-ruby, I can get it to prompt for the command to run. Both tcsh and
ftp work fine (including when ftp prompts for a password).

(Note that this means there's a workaround: have run-ruby start tcsh,
then start irb within it. That seems to work fine, but I want to know
what's going on.)

I think this is unrelated to the inf-ruby.el code, since a teensy 
elisp function has the same behavior:

(defun test-run (prog)
   (pop-to-buffer (make-comint "ruby" prog)))

I even think it's unrelated to Ruby. But if I report the bug to 
mac-emacs-users, I want to give something more specific than what I 
now know.

So, since I couldn't find anything via google, rubygarden, this list, 
I thought I'd ask.

(I've even gotten suspicious that irb starts ruby with
#!/usr/bin/env ruby
... ruby code ...

So I tried a file called "shell-exec-ftp" that looks like this:
#!/usr/bin/env ftp

That works. It differs from irb in that it has nothing after the #!
line, but I can't think of anything on this fresh system that I could
make look like how (I think) irb actually works.)