[#23332] to_str再考 — matz@... (Yukihiro Matsumoto)

まつもと ゆきひろです

15 messages 2004/04/05

[#23380] [SEGV] make test-all (bccwin32 ruby1.9.0) — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>

山本です。

17 messages 2004/04/15
[#23400] Re: [SEGV] make test-all (bccwin32 ruby1.9.0) — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2004/04/16

山本です。落ちる場所がわかりました。

[#23402] Re: [SEGV] make test-all (bccwin32 ruby1.9.0) — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2004/04/16

山本です。

[#23403] Re: [SEGV] make test-all (bccwin32 ruby1.9.0) — nobu.nakada@... 2004/04/16

なかだです。

[#23405] Re: [SEGV] make test-all (bccwin32 ruby1.9.0) — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2004/04/16

山本です。

[#23407] Re: [SEGV] make test-all (bccwin32 ruby1.9.0) — "H.Yamamoto" <ocean@...2.ccsnet.ne.jp> 2004/04/16

山本です。

[ruby-dev:23298] Re: ruby-mode.elでのインデント

From: matz@... (Yukihiro Matsumoto)
Date: 2004-04-01 12:39:29 UTC
List: ruby-dev #23298
まつもと ゆきひろです

In message "[ruby-dev:23294] ruby-mode.elでのインデント"
    on 04/04/01, Kazuhiro NISHIYAMA <zn@mbf.nifty.com> writes:

|インスタンス変数のメソッド呼び出しの引数の文字列リテラルの中に
|"#"や"#{x}"などがあるとインデントが変になるようです。

こんなパッチでどうでしょう。当てるとインデントが崩れますが、
CVSではきちんとしますので確認だけしてみてください。

--- ruby-mode.el	3 Mar 2004 04:55:33 -0000	1.79
+++ ruby-mode.el	1 Apr 2004 12:38:04 -0000
@@ -601,3 +568,3 @@ The variable ruby-indent-level controls 
 	    (case-fold-search nil)
-	    state bol eol begin
+	  state bol eol begin op-end
 	    (paren (progn (skip-syntax-forward " ")
@@ -661,3 +628,2 @@ The variable ruby-indent-level controls 
 		 (setq indent (- indent ruby-indent-level))))
-	   ;;operator terminated lines
 	   ((and
@@ -679,2 +645,3 @@ The variable ruby-indent-level controls 
 	    (end-of-line)
+	  ;; skip the comment at the end
 	    (skip-chars-backward " \t")
@@ -684,3 +651,5 @@ The variable ruby-indent-level controls 
 			  (setq end (1- (point)))
-			  (ruby-special-char-p end))
+			(or (ruby-special-char-p end)
+			    (and (setq state (ruby-parse-region parse-start end))
+				 (nth 0 state))))
 		(setq end nil))
@@ -688,5 +657,4 @@ The variable ruby-indent-level controls 
 	      (skip-chars-backward " \t")
-	      (setq state (ruby-parse-region parse-start (point)))
-	      (setq begin (or (nth 0 state) (cdr (nth 1 state))))
-	      (goto-char pos))
+	    (setq begin (if (nth 0 state) pos (cdr (nth 1 state))))
+	    (setq state (ruby-parse-region parse-start (point))))
 	    (or (bobp) (forward-char -1))
@@ -702,12 +670,12 @@ The variable ruby-indent-level controls 
 		      (not (ruby-special-char-p))
+		    ;; operator at the end of line
 		      (let ((c (char-after (point))))
 			(and
-			 (or (not (eq ?, c))
-			     (null begin)
-			     (save-excursion
-			       (goto-char begin)
-			       (skip-chars-forward " \t")
-			       (not (or (eolp) (looking-at "#")
-					(and (eq (car (nth 1 state)) ?{)
-					     (looking-at "|"))))))
+;; 		       (or (null begin)
+;; 			   (save-excursion
+;; 			     (goto-char begin)
+;; 			     (skip-chars-forward " \t")
+;; 			     (not (or (eolp) (looking-at "#")
+;; 				      (and (eq (car (nth 1 state)) ?{)
+;; 					   (looking-at "|"))))))
 			 (or (not (eq ?/ c))
@@ -727,3 +695,5 @@ The variable ruby-indent-level controls 
 					(not (looking-at "do\\>[^_]")))))
-				(t t))))))))
+			      (t t))))
+		       (not (eq ?, c))
+		       (setq op-end t)))))
 	     (setq indent
@@ -731,2 +701,3 @@ The variable ruby-indent-level controls 
 		    ((and
+		    (null op-end)
 		      (not (looking-at ruby-block-hanging-re))
@@ -738,3 +709,2 @@ The variable ruby-indent-level controls 
 		       (skip-syntax-forward " ")
-;;		       (ruby-beginning-of-arg (or begin parse-start) (point))
 		       (current-column)))

In This Thread

Prev Next