start heredoc inside a string or comment.
+2013-06-30 Dmitry Gutov <dgutov@yandex.ru>
+
+ * progmodes/ruby-mode.el (ruby-syntax-propertize-function): Don't
+ start heredoc inside a string or comment.
+
2013-06-29 Eli Zaretskii <eliz@gnu.org>
* bindings.el (visual-order-cursor-movement): New defcustom.
("^\\(=\\)begin\\_>" (1 "!"))
;; Handle here documents.
((concat ruby-here-doc-beg-re ".*\\(\n\\)")
- (7 (unless (ruby-singleton-class-p (match-beginning 0))
+ (7 (unless (or (nth 8 (save-excursion
+ (syntax-ppss (match-beginning 0))))
+ (ruby-singleton-class-p (match-beginning 0)))
(put-text-property (match-beginning 7) (match-end 7)
'syntax-table (string-to-syntax "\""))
(ruby-syntax-propertize-heredoc end))))
(ert-deftest ruby-heredoc-highlights-interpolations ()
(ruby-assert-face "s = <<EOS\n #{foo}\nEOS" 15 font-lock-variable-name-face))
+(ert-deftest ruby-no-heredoc-inside-quotes ()
+ (ruby-assert-state "\"<<\", \"\",\nfoo" 3 nil))
+
(ert-deftest ruby-deep-indent ()
(let ((ruby-deep-arglist nil)
(ruby-deep-indent-paren '(?\( ?\{ ?\[ ?\] t)))