Commit bc55021adfcd77cbd5a060ae27a0245019c91858

fix for newer inf-ruby, second attempt
rails-ruby.el
(20 / 23)
  
173173
174174(require 'inf-ruby)
175175
176(if (fboundp 'inf-ruby-mode)
177 (defun run-ruby-in-buffer (buf script &optional params)
178 "Run CMD as a ruby process in BUF if BUF does not exist."
179 (let ((abuf (concat "*" buf "*")))
180 (when (not (comint-check-proc abuf))
181 (set-buffer (make-comint buf rails-ruby-command nil script params)))
182 (inferior-ruby-mode)
183 (make-local-variable 'inferior-ruby-first-prompt-pattern)
184 (make-local-variable 'inferior-ruby-prompt-pattern)
185 (setq inferior-ruby-first-prompt-pattern "^>> "
186 inferior-ruby-prompt-pattern "^>> ")
187 (pop-to-buffer abuf)))
188 (defun run-ruby-in-buffer (buf script &optional params)
189 "Run CMD as a ruby process in BUF if BUF does not exist."
190 (let ((abuf (concat "*" buf "*")))
191 (when (not (comint-check-proc abuf))
192 (set-buffer (make-comint buf rails-ruby-command nil script params)))
193 (inf-ruby-mode)
194 (make-local-variable 'inf-ruby-first-prompt-pattern)
195 (make-local-variable 'inf-ruby-prompt-pattern)
196 (setq inf-ruby-first-prompt-pattern "^>> "
197 inf-ruby-prompt-pattern "^>> ")
198 (pop-to-buffer abuf))))
176(defun run-ruby-in-buffer (buf script &optional params)
177 "Run CMD as a ruby process in BUF if BUF does not exist."
178 (let ((abuf (concat "*" buf "*")))
179 (when (not (comint-check-proc abuf))
180 (set-buffer (make-comint buf rails-ruby-command nil script params)))
181 (if (fboundp 'inf-ruby-mode)
182 (progn
183 (inf-ruby-mode)
184 (make-local-variable 'inf-ruby-first-prompt-pattern)
185 (make-local-variable 'inf-ruby-prompt-pattern)
186 (setq inf-ruby-first-prompt-pattern "^>> "
187 inf-ruby-prompt-pattern "^>> ")
188 (pop-to-buffer abuf))
189 (progn
190 (inferior-ruby-mode)
191 (make-local-variable 'inferior-ruby-first-prompt-pattern)
192 (make-local-variable 'inferior-ruby-prompt-pattern)
193 (setq inferior-ruby-first-prompt-pattern "^>> "
194 inferior-ruby-prompt-pattern "^>> ")
195 (pop-to-buffer abuf)))))
199196
200197(defun complete-ruby-method (prefix &optional maxnum)
201198 (if (capital-word-p prefix)