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

String-symbol parameter defaults are incorrectly shown as identifiers #1256

Closed
AaronC81 opened this issue Jun 22, 2019 · 0 comments
Closed
Labels

Comments

@AaronC81
Copy link

If a string-symbol (:'foo') is used as a default value for a method parameter, then that default is incorrectly converted to a plain identifier (foo). This was mentioned on an issue on my project which uses YARD's registry.

Steps to reproduce

Save the following into a file called main.rb.

module Example
  class Foo
    def bar(x = :'abomination')
      3
    end
  end
end

Then:

  1. Run the following command: yardoc main.rb
  2. Open the docs for the only method

Actual Output

Bad signature

Expected Output

The signature should have the default as :'abomination' rather than abomination.

Environment details:

  • OS: Ubuntu 18.04
  • Ruby version (ruby -v): Ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]
  • YARD version (yard -v): yard 0.9.19
  • Relevant software dependency/versions: N/A

I have read the Contributing Guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants