1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* lib/rdoc/parsers/parse_rb.rb (RDoc#collect_first_comment): skip

magic comment.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-06-21 06:57:28 +00:00
parent 3d9c550bf9
commit 47f5c15e8d
2 changed files with 11 additions and 2 deletions

View file

@ -1,3 +1,8 @@
Sat Jun 21 15:57:15 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/rdoc/parsers/parse_rb.rb (RDoc#collect_first_comment): skip
magic comment.
Sat Jun 21 15:54:55 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in: check if fork works with pthread.

View file

@ -1536,10 +1536,15 @@ class RDoc::RubyParser
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
@ -1547,7 +1552,6 @@ class RDoc::RubyParser
tk = get_tk
end
end
first_line = false
end
unget_tk(tk)
res