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

Exception: reference see tag in another see tag #1111

Closed
justinhoward opened this issue Aug 14, 2017 · 1 comment
Closed

Exception: reference see tag in another see tag #1111

justinhoward opened this issue Aug 14, 2017 · 1 comment
Labels

Comments

@justinhoward
Copy link

Using a reference see tag like (see #initialize) causes an unhandled exception when used inside a @see tag.

Steps to reproduce

# test.rb
class Test
  # @see (see #initialize)
  attr_accessor :test

  # @see http://example.com
  def initialize
  end
end

Actual Output

$ yardoc --debug test.rb
[debug]: parsing ["test.rb"] with `ruby` parser
[debug]: parsing test.rb
[error]: unhandled exception in yard::handlers::ruby::attributehandler:
  in `test.rb`:4:

	4: attr_accessor :test

[error]: nomethoderror: undefined method `text' for #<yard::tags::reftaglist:0x00000002232cb8>
[error]: stack trace:
	../.gem/ruby/2.4.0/gems/yard-0.9.9/lib/yard/docstring_parser.rb:336:in `block (2 levels) in <class:docstringparser>'
	../.gem/ruby/2.4.0/gems/yard-0.9.9/lib/yard/docstring_parser.rb:334:in `each'
	../.gem/ruby/2.4.0/gems/yard-0.9.9/lib/yard/docstring_parser.rb:334:in `each_with_index'
	../.gem/ruby/2.4.0/gems/yard-0.9.9/lib/yard/docstring_parser.rb:334:in `block in <class:docstringparser>'
	../.gem/ruby/2.4.0/gems/yard-0.9.9/lib/yard/docstring_parser.rb:326:in `block in call_after_parse_callbacks'
	../.gem/ruby/2.4.0/gems/yard-0.9.9/lib/yard/docstring_parser.rb:325:in `each'

[debug]: serializing to .yardoc/objects/root.dat
[debug]: re-generating object ...
[debug]: re-generating object test...
[debug]: generating asset js/jquery.js
[debug]: serializing to doc/js/jquery.js
[debug]: generating asset js/app.js
[debug]: serializing to doc/js/app.js
[debug]: generating asset js/full_list.js
[debug]: serializing to doc/js/full_list.js
[debug]: generating asset css/style.css
[debug]: serializing to doc/css/style.css
[debug]: generating asset css/common.css
[debug]: serializing to doc/css/common.css
[debug]: generating asset css/full_list.css
[debug]: serializing to doc/css/full_list.css
[debug]: generating asset class_list.html
[debug]: serializing to doc/class_list.html
[debug]: generating asset method_list.html
[debug]: serializing to doc/method_list.html
[debug]: generating asset file_list.html
[debug]: serializing to doc/file_list.html
[debug]: generating asset frames.html
[debug]: serializing to doc/frames.html
[debug]: serializing to doc/index.html
[debug]: serializing to doc/_index.html
[debug]: serializing to doc/top-level-namespace.html
[debug]: serializing to doc/test.html
files:           1
modules:         0 (    0 undocumented)
classes:         1 (    0 undocumented)
constants:       0 (    0 undocumented)
attributes:      0 (    0 undocumented)
methods:         2 (    1 undocumented)
 66.67% documented

Expected Output

The @see tag for the attr_accessor copies the value from #initialize.

Environment details:

  • OS: Arch Linux - 4.12.4-1-ARCH
  • Ruby version (ruby -v): ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
  • YARD version (yard -v): yard 0.9.9

I have read the Contributing Guide.

@lsegal lsegal added the Bug label Aug 21, 2017
@lsegal lsegal closed this as completed in 1c65b28 Aug 21, 2017
@justinhoward
Copy link
Author

@lsegal What's your policy for tagging after a PR is merged? Can I expect this to be released soon?

lsegal added a commit that referenced this issue Nov 18, 2017
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