]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't hardcode ruby version in interpreter-mode-alist
authorStefan Kangas <stefankangas@gmail.com>
Wed, 2 Aug 2023 19:46:55 +0000 (21:46 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Wed, 2 Aug 2023 19:46:55 +0000 (21:46 +0200)
* 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

index e441ffbbfe370d1aa4f844606cc6ed23a45aa87a..9d8f45604f9c8bfa07a3b60a503877d37a75863b 100644 (file)
@@ -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)