branch: elpa/inf-ruby commit c905a1a65be5c779a4f001b2ea70212f6c4ac292 Author: Tilmann Singer <t...@tils.net> Commit: Tilmann Singer <t...@tils.net>
Ignore warnings in `irb -v` output Fix parsing of the version string in `inf-ruby--irb-needs-nomultiline-p` when the output of `irb -v` looks like this: $ irb -v Ignoring argon2-2.3.0 because its extensions are not built. Try: gem pristine argon2 --version 2.3.0 [...] irb 1.12.0 (2024-03-06) --- 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))