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.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el
index 5e252a28ae..ed35801958 100644
--- a/misc/ruby-mode.el
+++ b/misc/ruby-mode.el
@@ -592,7 +592,7 @@ An end of a defun is found by moving forward from the beginning of one."
(setq start (ruby-calculate-indent))
(if (eobp)
nil
- (while (and (not (bobp)) (not done))
+ (while (and (not (bobp)) (not (eobp)) (not done))
(forward-line n)
(cond
((looking-at "^$"))