summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-29 08:24:20 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-29 08:24:20 +0000
commit5e686f8ba3a7728398f4ed4d89bdde54fad7554d (patch)
tree4e278773db5da1c8a235c4f0e0daf9ec28092a4e
parentdf1b7c729fc0701b2c371b78650f26acf0ec3398 (diff)
merge revision(s) 17497:
* lib/rdoc/parsers/parse_rb.rb (RDoc#collect_first_comment): skip magic comment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@17666 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--lib/rdoc/parsers/parse_rb.rb8
-rw-r--r--version.h2
3 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 0d55265de9..9228a5390f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sun Jun 29 17:23:51 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/rdoc/parsers/parse_rb.rb (RDoc#collect_first_comment): skip
+ magic comment.
+
Sun Jun 29 17:21:08 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/stringio/stringio.c (strio_each, strio_readlines): IO#each and
diff --git a/lib/rdoc/parsers/parse_rb.rb b/lib/rdoc/parsers/parse_rb.rb
index 58ba06084e..750c483c15 100644
--- a/lib/rdoc/parsers/parse_rb.rb
+++ b/lib/rdoc/parsers/parse_rb.rb
@@ -1546,10 +1546,15 @@ module RDoc
tk = get_tk
while tk.kind_of?(TkCOMMENT)
- if first_line && tk.text[0,2] == "#!"
+ if first_line && /\A#!/ =~ tk.text
+ skip_tkspace
+ tk = get_tk
+ elsif first_line && /\A#\s*-\*-/ =~ tk.text
+ first_line = false
skip_tkspace
tk = get_tk
else
+ first_line = false
res << tk.text << "\n"
tk = get_tk
if tk.kind_of? TkNL
@@ -1557,7 +1562,6 @@ module RDoc
tk = get_tk
end
end
- first_line = false
end
unget_tk(tk)
res
diff --git a/version.h b/version.h
index 3bfe8012c0..ccc2b276b5 100644
--- a/version.h
+++ b/version.h
@@ -2,7 +2,7 @@
#define RUBY_RELEASE_DATE "2008-06-29"
#define RUBY_VERSION_CODE 186
#define RUBY_RELEASE_CODE 20080629
-#define RUBY_PATCHLEVEL 244
+#define RUBY_PATCHLEVEL 245
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8