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

Yard not working properly since Jruby 9.1.3.0 #4415

Closed
frankwong15 opened this issue Dec 28, 2016 · 1 comment
Closed

Yard not working properly since Jruby 9.1.3.0 #4415

frankwong15 opened this issue Dec 28, 2016 · 1 comment

Comments

@frankwong15
Copy link
Contributor

Environment

jruby 9.1.6.0 (2.3.1) 2016-11-09 0150a76 Java HotSpot(TM) 64-Bit Server VM 25.111-b14 on 1.8.0_111-b14 +jit [linux-x86_64]
Linux frank-nb 4.4.0-57-generic #78-Ubuntu SMP Fri Dec 9 23:50:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
yard (0.9.5)

test_yard.rb

# Module level description

module TestYard

  # test method documentation
  #
  # @param a [String] test params
  # @return [Date] test return type
  def test(a)
  end

end

Expected Behavior

jruby-9.1.2.0 :014 > YARD::Parser::Ruby::RubyParser.parse(File.read('test_yard.rb')).root
 => s(s(:module, s(:const_ref, s(:const, "TestYard")), s(s(:void_stmt, ), s(:def, s(:ident, "test"), s(:paren, s(:params, s(s(:ident, "a")), nil, nil, nil, nil, nil, nil)), s(s(:void_stmt, ))))))

Actual Behavior

jruby-9.1.6.0 :020 > YARD::Parser::Ruby::RubyParser.parse(File.read('test_yard.rb')).root
 => s(s(:module, s(:const_ref, s(:const, "TestYard")), s(s(:void_stmt, ), s(:def, s(:ident, "test"), s(:paren, s(:params, s(s(:ident, "a")), nil, nil, nil, nil, nil, nil)), s(s(:void_stmt, ))))), s(:comment, "Module level description"), s(:comment, "test method documentation\n\n@param a [String] test params\n@return [Date] test return type"))

See also lsegal/yard#1044, yard/lib/yard/parser/ruby/ruby_parser.rb

I think it is related to Ripper, but not sure where to start looking.

@frankwong15
Copy link
Contributor Author

Duplicated #4363

@enebo enebo added this to the Invalid or Duplicate milestone Jan 10, 2017
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

2 participants