Skip to content

Commit 2725175

Browse files
committed
Fix test_parse_statements_def_percent_string_pound
1 parent a2b511c commit 2725175

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/test_rdoc_parser_ruby.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class C; end
7474

7575
comment = parser.collect_first_comment
7676

77-
assert_equal RDoc::Comment.new("first\n", @top_level), comment
77+
assert_equal RDoc::Comment.new("=begin\nfirst\n=end\n", @top_level), comment
7878
end
7979

8080
def test_get_class_or_module
@@ -2154,7 +2154,9 @@ def test_parse_statements_def_percent_string_pound
21542154
{ :line_no => 2, :char_no => 5, :kind => :on_nl, :text => "\n" },
21552155
{ :line_no => 3, :char_no => 0, :kind => :on_regexp, :text => '%r{#}' },
21562156
{ :line_no => 3, :char_no => 5, :kind => :on_nl, :text => "\n" },
2157-
{ :line_no => 4, :char_no => 0, :kind => :on_kw, :text => 'end' }
2157+
{ :line_no => 4, :char_no => 0, :kind => :on_regexp, :text => '%r{#{}}' },
2158+
{ :line_no => 4, :char_no => 7, :kind => :on_nl, :text => "\n" },
2159+
{ :line_no => 5, :char_no => 0, :kind => :on_kw, :text => 'end' }
21582160
]
21592161
parsed_stream = a.token_stream.map { |tk|
21602162
{

0 commit comments

Comments
 (0)