branch: elpa/inf-ruby
commit b88ff8bd5fe2e468de611b0211842634beaeb5da
Merge: dac615c7fd c905a1a65b
Author: Dmitry Gutov <[email protected]>
Commit: GitHub <[email protected]>

    Merge pull request #183 from til/ignore-stderr-of-irb-v
    
    Ignore warnings in `irb -v` output
---
 inf-ruby.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/inf-ruby.el b/inf-ruby.el
index f685eeba7e..142eea015c 100755
--- a/inf-ruby.el
+++ b/inf-ruby.el
@@ -110,10 +110,10 @@ returns a string."
     command))
 
 (defun inf-ruby--irb-needs-nomultiline-p (&optional with-bundler)
-  (let* ((output (shell-command-to-string
-                  (concat
-                   (when with-bundler "bundle exec ")
-                   "irb -v")))
+  (let* ((output (car (last (apply #'process-lines
+                                   (append
+                                    (when with-bundler '("bundle" "exec"))
+                                    '("irb" "-v"))))))
          (fields (split-string output "[ (]")))
     (if (equal (car fields) "irb")
         (version<= "1.2.0" (nth 1 fields))

Reply via email to