* lisp/progmodes/ruby-mode.el (ruby-syntax-propertize):
Make sure to backtrack if the "symbols with special characters"
rule is aborted because of preceding colon.
;; Symbols with special characters.
(":\\([-+~]@?\\|[/%&|^`]\\|\\*\\*?\\|<\\(<\\|=>?\\)?\\|>[>=]?\\|===?\\|=~\\|![~=]?\\|\\[\\]=?\\)"
(1 (unless (or
- (eq (char-before (match-beginning 0)) ?:)
- (nth 8 (syntax-ppss (match-beginning 1))))
+ (nth 8 (syntax-ppss (match-beginning 1)))
+ (eq (char-before (match-beginning 0)) ?:))
(goto-char (match-end 0))
(string-to-syntax "_"))))
;; Symbols ending with '=' (bug#42846).
# Multiline regexp.
/bars
tees # toots
- nfoos/
+ nfoos::/
def test1(arg)
puts "hello"