Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Methods with ... argument forwarding don't show up in docs #1439

Closed
svoop opened this issue Apr 9, 2022 · 4 comments
Closed

Methods with ... argument forwarding don't show up in docs #1439

svoop opened this issue Apr 9, 2022 · 4 comments

Comments

@svoop
Copy link

svoop commented Apr 9, 2022

Steps to reproduce

Given a source:

class Foo

  # Forwards any kind of arguments
  def bar(...)
    baz(...)
  end

  # Prints a string
  #
  # @param string [String]
  def baz(string)
    puts string
  end
end

The documentation generated with yard doc --one-file --no-private foo.rb does not contain bar, however, if another signature than (...) is used, it will show up normally:

Screenshot 2022-04-09 at 15 21 23

Environment details:

  • OS: macOS 12.3.1
  • Ruby version (ruby -v): 3.1.1
  • YARD version (yard -v): 0.9.27

I have read the Contributing Guide.

@svoop
Copy link
Author

svoop commented Apr 9, 2022

In case this is not a bug but my bad: What docstring is required for methods with (...) signature to show up in the generated docs?

@ojab
Copy link
Contributor

ojab commented Apr 12, 2022

Looks like ... method signature (ruby-2.7 feature) is not supported by yard parser, I'm getting

[error]: Unhandled exception in YARD::Handlers::Ruby::MethodHandler:
  in `lib/forward_test.rb`:1:

	1: def xxx(...)

here

@lsegal
Copy link
Owner

lsegal commented Jun 1, 2022

This should be fixed by #1431

@lsegal lsegal closed this as completed Jun 1, 2022
@svoop
Copy link
Author

svoop commented Jun 1, 2022

@lsegal Great, thanks a lot!!

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

No branches or pull requests

3 participants