ruby-mode: Recognize instance or global var as first arg in parenless call
* lisp/progmodes/ruby-mode.el (ruby-smie--args-separator-p): Recognize instance or global var as first arg in parenless call. * test/lisp/progmodes/ruby-mode-resources/ruby.rb: Add example.
This commit is contained in:
@@ -468,7 +468,7 @@ This only affects the output of the command `ruby-toggle-block'."
|
||||
"else" "elsif" "do" "end" "and")
|
||||
'symbols))))
|
||||
(memq (car (syntax-after pos)) '(7 15))
|
||||
(looking-at "[([]\\|[-+!~:]\\(?:\\sw\\|\\s_\\)")))))
|
||||
(looking-at "[([]\\|[-+!~:@$]\\(?:\\sw\\|\\s_\\)")))))
|
||||
|
||||
(defun ruby-smie--before-method-name ()
|
||||
;; Only need to be accurate when method has keyword name.
|
||||
|
||||
@@ -174,6 +174,9 @@ qux :+,
|
||||
bar,
|
||||
:a
|
||||
|
||||
zzz @abc,
|
||||
4
|
||||
|
||||
b = $:
|
||||
c = ??
|
||||
|
||||
|
||||
Reference in New Issue
Block a user