summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-26 07:53:40 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-26 07:53:40 +0000
commit99e8314b3bac2fa842817b67f749974beb721b9f (patch)
tree4ad03331db768b9eeeae816b3c972acd0c66d33d
parent3b0f5058fa3b97a88cec5be0d1ce9699862cfa62 (diff)
* misc/ruby-mode.el (ruby-calculate-indent): should distinguish
comment and # in strings. [ruby-dev:33874] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15615 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--misc/ruby-mode.el2
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index a3f9b6a132..8892fd512a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Feb 26 16:53:13 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * misc/ruby-mode.el (ruby-calculate-indent): should distinguish
+ comment and # in strings. [ruby-dev:33874]
+
Tue Feb 26 16:41:27 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* array.c (combi_len, rb_ary_product): check for overflow.
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