summaryrefslogtreecommitdiff
path: root/test/rdoc
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2019-11-27 11:58:38 +0900
committeraycabta <aycabta@gmail.com>2019-11-28 08:19:05 +0900
commit2d0a1a1869e601dc0d50a86a89fe98edcbd24f09 (patch)
tree6b856f051311fb18f1db133e19bec2ee8af68dbc /test/rdoc
parentf9debf343788a6460e1e67bd7efc470d73e69f21 (diff)
Fix ghost method line no
Diffstat (limited to 'test/rdoc')
-rw-r--r--test/rdoc/test_rdoc_parser_ruby.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/rdoc/test_rdoc_parser_ruby.rb b/test/rdoc/test_rdoc_parser_ruby.rb
index b2ea968682..d9de1e734e 100644
--- a/test/rdoc/test_rdoc_parser_ruby.rb
+++ b/test/rdoc/test_rdoc_parser_ruby.rb
@@ -776,6 +776,7 @@ end
blah = foo.method_list.first
assert_equal 'Foo#blah', blah.full_name
+ assert_equal 3, blah.line
assert_equal @top_level, blah.file
end
@@ -825,6 +826,7 @@ end
blah = foo.method_list.first
assert_equal 'Foo#yields', blah.full_name
assert_equal 'yields(name)', blah.call_seq
+ assert_equal 3, blah.line
assert_equal @top_level, blah.file
end
@@ -1323,7 +1325,7 @@ EOF
assert_equal 'foo', foo.name
assert_equal 'my method', foo.comment.text
assert_equal @top_level, foo.file
- assert_equal 1, foo.line
+ assert_equal 2, foo.line
assert_equal [], foo.aliases
assert_nil foo.block_params
@@ -1344,8 +1346,8 @@ EOF
stream = [
{
- :line_no => 1, :char_no => 1, :kind => :on_comment,
- :text => "# File #{@top_level.relative_name}, line 1"
+ :line_no => 2, :char_no => 1, :kind => :on_comment,
+ :text => "# File #{@top_level.relative_name}, line 2"
},
{ :line_no => 0, :char_no => 0, :kind => :on_nl, :text => "\n" },
{ :line_no => 1, :char_no => 1, :kind => :on_sp, :text => '' }