summaryrefslogtreecommitdiff
path: root/lisp/progmodes/ruby-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/ruby-mode.el')
-rw-r--r--lisp/progmodes/ruby-mode.el5
1 files changed, 5 insertions, 0 deletions
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index 69c850255d0..cb5fe11ada6 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -364,6 +364,8 @@ explicitly declared in magic comment."
(and (eq (char-before) ?=)
(string-match "\\`\\s." (save-excursion
(ruby-smie--backward-token))))
+ (and (eq (char-before) ?|)
+ (eq (char-before (1- (point))) ?|))
(and (eq (car (syntax-after (1- (point)))) 2)
(member (save-excursion (ruby-smie--backward-token))
'("iuwu-mod" "and" "or")))
@@ -546,6 +548,9 @@ explicitly declared in magic comment."
"+=" "-=" "*=" "/=" "%=" "**=" "&=" "|=" "^="
"<<=" ">>=" "&&=" "||=" "and" "or"))
(if (smie-rule-parent-p ";" nil) ruby-indent-level))
+ (`(:before . "begin")
+ (unless (save-excursion (skip-chars-backward " \t") (bolp))
+ (smie-rule-parent)))
))
(defun ruby-imenu-create-index-in-block (prefix beg end)