summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
Diffstat (limited to 'misc')
-rw-r--r--misc/ruby-mode.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el
index 59efd66f66..49a43ae17d 100644
--- a/misc/ruby-mode.el
+++ b/misc/ruby-mode.el
@@ -713,7 +713,7 @@ The variable ruby-indent-level controls the amount of indentation.
(setq end nil))
(goto-char (or end pos))
(skip-chars-backward " \t")
- (setq begin (if (nth 0 state) pos (cdr (nth 1 state))))
+ (setq begin (if (and end (nth 0 state)) pos (cdr (nth 1 state))))
(setq state (ruby-parse-region parse-start (point))))
(or (bobp) (forward-char -1))
(and