Skip to content

Commit 5e686f8

Browse files
committed
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
1 parent df1b7c7 commit 5e686f8

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Sun Jun 29 17:23:51 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
2+
3+
* lib/rdoc/parsers/parse_rb.rb (RDoc#collect_first_comment): skip
4+
magic comment.
5+
16
Sun Jun 29 17:21:08 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
27

38
* ext/stringio/stringio.c (strio_each, strio_readlines): IO#each and

lib/rdoc/parsers/parse_rb.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1546,18 +1546,22 @@ def collect_first_comment
15461546

15471547
tk = get_tk
15481548
while tk.kind_of?(TkCOMMENT)
1549-
if first_line && tk.text[0,2] == "#!"
1549+
if first_line && /\A#!/ =~ tk.text
1550+
skip_tkspace
1551+
tk = get_tk
1552+
elsif first_line && /\A#\s*-\*-/ =~ tk.text
1553+
first_line = false
15501554
skip_tkspace
15511555
tk = get_tk
15521556
else
1557+
first_line = false
15531558
res << tk.text << "\n"
15541559
tk = get_tk
15551560
if tk.kind_of? TkNL
15561561
skip_tkspace(false)
15571562
tk = get_tk
15581563
end
15591564
end
1560-
first_line = false
15611565
end
15621566
unget_tk(tk)
15631567
res

version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#define RUBY_RELEASE_DATE "2008-06-29"
33
#define RUBY_VERSION_CODE 186
44
#define RUBY_RELEASE_CODE 20080629
5-
#define RUBY_PATCHLEVEL 244
5+
#define RUBY_PATCHLEVEL 245
66

77
#define RUBY_VERSION_MAJOR 1
88
#define RUBY_VERSION_MINOR 8

0 commit comments

Comments
 (0)