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

Import RDoc 2.5.4

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
drbrain 2010-04-19 05:08:28 +00:00
parent 37e59f5583
commit 75ef9e79d6
14 changed files with 169 additions and 77 deletions

View file

@ -1210,6 +1210,33 @@ EOF
assert_equal 1, @top_level.requires.length
end
def test_parse_statements_while_begin
util_parser <<-RUBY
class A
def a
while begin a; b end
end
end
def b
end
end
RUBY
@parser.parse_statements @top_level, RDoc::Parser::Ruby::NORMAL, nil, ''
c_a = @top_level.classes.first
assert_equal 'A', c_a.full_name
assert_equal 1, @top_level.classes.length
m_a = c_a.method_list.first
m_b = c_a.method_list.last
assert_equal 'A#a', m_a.full_name
assert_equal 'A#b', m_b.full_name
end
def test_parse_top_level_statements_alias_method
content = <<-CONTENT
class A