From 1f30404ebcf7c23f4a79e9ac61a17dc9c6a5c9c3 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Wed, 2 Aug 2023 21:46:55 +0200 Subject: [PATCH] Don't hardcode ruby version in interpreter-mode-alist * lisp/progmodes/ruby-mode.el (interpreter-mode-alist): Don't hardcode ruby version. This adds support for modern versions of Ruby like "ruby2.7", instead of the previously hardcoded "ruby1.9". --- lisp/progmodes/ruby-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index e441ffbbfe3..9d8f45604f9 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -2708,7 +2708,7 @@ Currently there are `ruby-mode' and `ruby-ts-mode'." 'ruby-mode)) ;;;###autoload -(dolist (name (list "ruby" "rbx" "jruby" "ruby1.9" "ruby1.8")) +(dolist (name (list "ruby" "rbx" "jruby" "j?ruby\\(?:[0-9.]+\\)")) (add-to-list 'interpreter-mode-alist (cons (purecopy name) 'ruby-mode))) (provide 'ruby-mode) -- 2.39.2