Skip to content

Conversation

@vspy
Copy link
Contributor

@vspy vspy commented Jan 5, 2014

Without changes proposed with this pull request, rdoc failed to handle method arguments properly for the following cases.

Coverage for

# test method, yields +foo+
def test_method1
  yield(foo)
end

reported undocumented '++' parameter (empty parameter name!)

# test method with explicit +block+ argument
def test_method3 &block
  block.call
end

reported undocumented '+&block+' parameter, and there were no way to describe it, as parameter names should start with letter, according to rdoc grammar.

# only +baz+ has to be documented here
def test_method4 &block
  yield baz
end

reported undocumented '+&block+' parameter, and it shouldn't be documented at all.

…, any_method#param_list fix for empty arguments list with non-empty yield parameters
drbrain added a commit that referenced this pull request Jan 7, 2014
Explicit block arguments / fix for methods without arguments
@drbrain drbrain merged commit 80bee17 into ruby:master Jan 7, 2014
drbrain added a commit that referenced this pull request Jan 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants