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

Incompatibility with Ruby 2.5 #58

Closed
ronaldtse opened this issue Jun 12, 2018 · 4 comments
Closed

Incompatibility with Ruby 2.5 #58

ronaldtse opened this issue Jun 12, 2018 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@ronaldtse
Copy link
Contributor

Under Ruby 2.5, the code block with **p will return an error in parsing.

@ronaldtse ronaldtse added the bug Something isn't working label Jun 12, 2018
@opoudjis
Copy link
Contributor

This appears to be Rubocop poorly implementing an upcoming Ruby 2.6 warning, and the cop has already been disabled: rubocop/rubocop#5887, rubocop/rubocop@9f976de

Rubocop 0.56 seems to warn about all possible usages of **options, whereas a recent ruby 2.6.0dev only warns about some very specific usages where the method is defined to take a hash as a positional argument instead of keyword arguments.

What this cop was trying to realize is emulating experimental
warnings for Ruby 2.6. And that is something of the future.
So this PR will remove this cop until the prospect of existing
problem solving.

I dislike Rubocop, you won't be surprised to hear. I hate even more that they're issuing warnings about versions of the language that aren't even published yet; and the fact that they're getting those warnings wrong is just contemptible.

@ronaldtse
Copy link
Contributor Author

It’s not about rubocop — it’s a real runtime crash... will find you the block later.

@ronaldtse ronaldtse reopened this Jun 12, 2018
@ronaldtse
Copy link
Contributor Author

This line fails on Ruby 2.5:

https://github.com/riboseinc/isodoc/blob/88163d2cabf1b7eea4f32a2ae038023f38ebd201/lib/isodoc/iso2wordhtml.rb#L90

Ruby 2.5 thinks that there are two blocks.

@opoudjis
Copy link
Contributor

Resolved all instances: wrapped double splat function arguments in parens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants