branch: elpa/inf-ruby
commit c59d7d0a231965ca87717e8583274dffa806de6e
Author: Dmitry Gutov <[email protected]>
Commit: Dmitry Gutov <[email protected]>

    inf-ruby-console-default: Prioritize console.rb if it exists
---
 inf-ruby.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/inf-ruby.el b/inf-ruby.el
index 9264d1c075..5020231448 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -680,12 +680,12 @@ Gemfile, it should use the `gemspec' instruction."
     (unless (file-exists-p "Gemfile")
       (error "The directory must contain a Gemfile"))
     (cond
+     ((file-exists-p "console.rb")
+      (run-ruby "bundle exec ruby console.rb" "console.rb"))
      ((inf-ruby-file-contents-match "Gemfile" "[\"']racksh[\"']")
       (run-ruby "bundle exec racksh" "racksh"))
      ((inf-ruby-file-contents-match "Gemfile" "[\"']pry[\"']")
       (run-ruby "bundle exec pry" "pry"))
-     ((file-exists-p "console.rb")
-      (run-ruby "bundle exec ruby console.rb" "console.rb"))
      (t
       (run-ruby "bundle console")))))
 

Reply via email to