Just to follow up,

it turns out the problem was with inf-ruby.el.  The simple fix is to
change the order of commands in `inferior-ruby-mode'.

A patch against the current ruby-mode svn trunk is below,

Best,
Eric

----------------------------------------------------------------------
Index: inf-ruby.el
===================================================================
--- inf-ruby.el	(revision 16821)
+++ inf-ruby.el	(working copy)
@@ -220,9 +220,9 @@
   (use-local-map inferior-ruby-mode-map)
   (setq comint-input-filter (function ruby-input-filter))
   (setq comint-get-old-input (function ruby-get-old-input))
-  (compilation-shell-minor-mode t)
   (make-local-variable 'compilation-error-regexp-alist)
   (setq compilation-error-regexp-alist inferior-ruby-error-regexp-alist)
+  (compilation-shell-minor-mode t)
   (run-hooks 'inferior-ruby-mode-hook))
 
 (defvar inferior-ruby-filter-regexp "\\`\\s *\\S ?\\S ?\\s *\\'"