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 on Ruby 1.9.3 #1089

Closed
jessebs opened this issue Apr 25, 2017 · 6 comments
Closed

Yard not working on Ruby 1.9.3 #1089

jessebs opened this issue Apr 25, 2017 · 6 comments

Comments

@jessebs
Copy link

jessebs commented Apr 25, 2017

Steps to reproduce

  1. Run the following command: yard -v on Ruby 1.9.3

Actual Output

jbowes@jbowes-mac ~/projects/nai-utils$ yard doc --no-private --debug
/Users/jbowes/.rvm/gems/ruby-1.9.3-p551@nai-utils/gems/yard-0.9.9/lib/yard/globals.rb:21:in log': /Users/jbowes/.rvm/gems/ruby-1.9.3-p551@nai-utils/gems/yard-0.9.9/lib/yard/logging.rb:13: invalid multibyte char (US-ASCII) (SyntaxError) /Users/jbowes/.rvm/gems/ruby-1.9.3-p551@nai-utils/gems/yard-0.9.9/lib/yard/logging.rb:13: invalid multibyte char (US-ASCII) /Users/jbowes/.rvm/gems/ruby-1.9.3-p551@nai-utils/gems/yard-0.9.9/lib/yard/logging.rb:13: syntax error, unexpected $end, expecting keyword_end PROGRESS_INDICATORS = %w(⣷ ⣯ ⣟ ⡿ ⢿ ⣻ ⣽ ⣾) ^ from /Users/jbowes/.rvm/gems/ruby-1.9.3-p551@nai-utils/gems/yard-0.9.9/lib/yard/cli/command_parser.rb:57:in initialize'
from /Users/jbowes/.rvm/gems/ruby-1.9.3-p551@nai-utils/gems/yard-0.9.9/lib/yard/cli/command_parser.rb:54:in new' from /Users/jbowes/.rvm/gems/ruby-1.9.3-p551@nai-utils/gems/yard-0.9.9/lib/yard/cli/command_parser.rb:54:in run'
from /Users/jbowes/.rvm/gems/ruby-1.9.3-p551@nai-utils/gems/yard-0.9.9/bin/yard:13:in <top (required)>' from /Users/jbowes/.rvm/gems/ruby-1.9.3-p551@nai-utils/bin/yard:23:in load'
from /Users/jbowes/.rvm/gems/ruby-1.9.3-p551@nai-utils/bin/yard:23:in <main>' from /Users/jbowes/.rvm/gems/ruby-1.9.3-p551@nai-utils/bin/ruby_executable_hooks:15:in eval'
from /Users/jbowes/.rvm/gems/ruby-1.9.3-p551@nai-utils/bin/ruby_executable_hooks:15:in `

'

Expected Output

Expect yard to work

Environment details:

  • OS: CentOS 7 and MacOS 10.12.4
  • Ruby version (ruby -v): ruby 1.9.3p551 (2014-11-13 revision 48407) [x86_64-darwin16.0.0]
  • YARD version (yard -v): 0.9.9

Fix

In lib/yard/logging.rb, the encoding line must be the first line

@zverok
Copy link

zverok commented Apr 25, 2017

0_0 Somebody still uses 1.9.3 in production?..

@jessebs
Copy link
Author

jessebs commented Apr 25, 2017

The contrib guide specifies "Ruby versions (1.8+)"

@zverok
Copy link

zverok commented Apr 25, 2017

Yes, I understand your concern (I am not a contributor, unforturnately, just interested spectator). Of course, all explictily specified Ruby versions should be supported. I am just wondering whether there are still real cases for 1.9 support except for abandoned gems docs.

@lsegal
Copy link
Owner

lsegal commented Apr 25, 2017

This is easy enough to fix.

@lsegal lsegal closed this as completed in f16cf4c Apr 25, 2017
@jessebs
Copy link
Author

jessebs commented Apr 25, 2017

You can go ahead and close Pull Request #1090 since you fixed it.

@lsegal
Copy link
Owner

lsegal commented Apr 25, 2017

YARD's policy on 1.8 was defined in v0.9.6, by the way:

Removed official support for Ruby 1.x (1.8/1.9). YARD can still be installed in these versions, but support is not guaranteed. Simple bug fixes may still be considered via pull request only. Issues without code will be automatically closed.

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
None yet
Projects
None yet
Development

No branches or pull requests

3 participants