summaryrefslogtreecommitdiff
path: root/misc/ruby-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'misc/ruby-mode.el')
-rw-r--r--misc/ruby-mode.el8
1 files changed, 6 insertions, 2 deletions
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el
index 0072f1e0d5..9a21c485a9 100644
--- a/misc/ruby-mode.el
+++ b/misc/ruby-mode.el
@@ -451,8 +451,12 @@ The variable ruby-indent-level controls the amount of indentation.
(or (eq (char-syntax (char-before (point))) ?w)
(ruby-special-char-p))))
nil)
- ((and (eq option 'heredoc) (< space 0)) t)
- ((or (looking-at ruby-operator-re)
+ ((and (progn (goto-char start) (eq option 'heredoc))
+ (progn (forward-word -1)
+ (not (and (or (bolp) (not (eq (char-before (point)) ?_)))
+ (looking-at "class<<")))))
+ t)
+ ((or (progn (goto-char start) (looking-at ruby-operator-re))
(looking-at "[\\[({,;]")
(and (looking-at "[!?]")
(or (not (eq option 'modifier))