rubocop / guard-rubocop

Guard plugin for RuboCop
MIT License
262 stars 55 forks source link

Support for ruby 2.6+ #43

Closed jasonknebel closed 4 years ago

jasonknebel commented 4 years ago

When trying to upgrade to ruby 2.6, I encounter the following error immediately upon boot up of guard.

Error: Unknown Ruby version 2.6 found in `.ruby-version`.
Supported versions: 2.2, 2.3, 2.4, 2.5
18:14:16 - ERROR - The following exception occurred while running guard-rubocop: /home/jason/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/gems/json-1.8.6/lib/json/common.rb:155:in `initialize' A JSON text must at least contain two octets! (JSON::ParserError)

This seems to come from a change in how JSON.parse handles empty values.

jasonknebel commented 4 years ago

The ruby version conflicts were resolved by upgrading rubocop.

The JSON error was part of a long chain. It seems to come from a blank file name on initialization being passed around. I have made changed in the code to get it working again. I will make sure it is the proper implementation and tested. Likely, I'll have a PR for this small fix.

jasonknebel commented 4 years ago

Ignore me. Just needed to upgrade Rubocop. Sorry for the unneeded notifications!