[前][次][番号順一覧][スレッド一覧]

ruby-changes:73494

From: Nobuyoshi <ko1@a...>
Date: Fri, 9 Sep 2022 14:24:07 +0900 (JST)
Subject: [ruby-changes:73494] be56033248 (master): Move RDoc `--`/`++` directives to comments

https://git.ruby-lang.org/ruby.git/commit/?id=be56033248

From be560332484c8893bec004f1250e48edcd4720e0 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Fri, 9 Sep 2022 11:52:57 +0900
Subject: Move RDoc `--`/`++` directives to comments

---
 template/prelude.c.tmpl | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/template/prelude.c.tmpl b/template/prelude.c.tmpl
index 3d792867f3..ac748704ed 100644
--- a/template/prelude.c.tmpl
+++ b/template/prelude.c.tmpl
@@ -48,7 +48,7 @@ class Prelude https://github.com/ruby/ruby/blob/trunk/template/prelude.c.tmpl#L48
       line.rstrip!
       lineno += 1
       @preludes[filename] ||= result
-      comment = ($1 || '' if line.sub!(/(?:^|\s+)\#(?:$|[#\s](.*))/, ''))
+      comment = ($1 || '' if line.sub!(/(?:^|\s+)\#(?!\{)(?:$|(?:[#\s]|(?=\W))(.*))/, ''))
       if !line.empty? or start_line
         line << "\n"
         start_line ||= lineno
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]