-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
bundle exec yard stats --list-undoc fails with exception #792
Comments
The actual error appears to be caused on line 133 of stats.rb @undoc_list |= undoc if @undoc_list Changing it to @undoc_list ||= undoc if @undoc_list resolves the issue. Not sure what |= is meant to do |
The Switching to
|
Makes sense. It's an unusual operator, so I incorrectly assumed it was a typo. |
bundle exec yard stats --list-undoc
is generating the exception below for me. I made a small patch that fixes this:
~/.rvm/gems/ruby-1.9.3-p547/gems/yard-0.8.7.4/lib/yard/cli/stats.rb
79- objects = @undoc_list.sort_by {|o| o.file }
79- objects = @undoc_list.sort_by {|o| o.file || "" }
/Users/benziegler/.rvm/gems/ruby-1.9.3-p547/gems/yard-0.8.7.4/lib/yard/cli/stats.rb:79:in
'sort_by': comparison of String with nil failed (ArgumentError) from /Users/benziegler/.rvm/gems/ruby-1.9.3-p547/gems/yard-0.8.7.4/lib/yard/cli/stats.rb:79:in
print_undocumented_objects'from /Users/benziegler/.rvm/gems/ruby-1.9.3-p547/gems/yard-0.8.7.4/lib/yard/cli/stats.rb:44:in
run' from /Users/benziegler/.rvm/gems/ruby-1.9.3-p547/gems/yard-0.8.7.4/lib/yard/cli/command.rb:13:in
run'from /Users/benziegler/.rvm/gems/ruby-1.9.3-p547/gems/yard-0.8.7.4/lib/yard/cli/command_parser.rb:71:in
run' from /Users/benziegler/.rvm/gems/ruby-1.9.3-p547/gems/yard-0.8.7.4/lib/yard/cli/command_parser.rb:53:in
run'from /Users/benziegler/.rvm/gems/ruby-1.9.3-p547/gems/yard-0.8.7.4/bin/yard:12:in
<top (required)>' from /Users/benziegler/.rvm/gems/ruby-1.9.3-p547/bin/yard:23:in
load'from /Users/benziegler/.rvm/gems/ruby-1.9.3-p547/bin/yard:23:in
<main>' from /Users/benziegler/.rvm/gems/ruby-1.9.3-p547/bin/ruby_executable_hooks:15:in
eval'from /Users/benziegler/.rvm/gems/ruby-1.9.3-p547/bin/ruby_executable_hooks:15:in `
The text was updated successfully, but these errors were encountered: