summaryrefslogtreecommitdiffstats
path: root/misc
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-07-30 08:23:31 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-07-30 08:23:31 +0000
commit47b75cb387400751b7bb4082db98f227be951a4d (patch)
tree8810ff39f9caac49cc43ee02e5847410b85dc9c9 /misc
parent27d51215664b7b2f9e62f7e1fa14654b9e643865 (diff)
downloadruby-47b75cb387400751b7bb4082db98f227be951a4d.tar.gz
ruby-47b75cb387400751b7bb4082db98f227be951a4d.tar.xz
ruby-47b75cb387400751b7bb4082db98f227be951a4d.zip
* misc/ruby-mode.el (ruby-accurate-end-of-block): incomplete block
caused infinite loop. * misc/ruby-mode.el (ruby-parse-partial): returns nil unless delimiters found. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@2669 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'misc')
-rw-r--r--misc/ruby-mode.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/misc/ruby-mode.el b/misc/ruby-mode.el
index 2faec5930..7bc5ec072 100644
--- a/misc/ruby-mode.el
+++ b/misc/ruby-mode.el
@@ -171,9 +171,10 @@ Also ignores spaces after parenthesis when 'space.")
(defun ruby-imenu-create-index ()
(nreverse (ruby-imenu-create-index-in-block nil (point-min) nil)))
-(defun ruby-accurate-end-of-block ()
+(defun ruby-accurate-end-of-block (&optional end)
(let (state)
- (while (>= (nth 2 (setq state (apply 'ruby-parse-partial end state))) 0))))
+ (while (and (setq state (apply 'ruby-parse-partial end state))
+ (>= (nth 2 state) 0)))))
(defun ruby-mode-variables ()
(set-syntax-table ruby-mode-syntax-table)
@@ -482,8 +483,8 @@ The variable ruby-indent-level controls the amount of indentation.
(t
(error (format "bad string %s"
(buffer-substring (point) pnt)
- ))))))
- (list in-string nest depth pcol))
+ )))))
+ (list in-string nest depth pcol)))
(defun ruby-parse-region (start end)
(let (state)