Skip to content

Commit

Permalink
Update from Parser::Ruby28 to Parser::Ruby30 for Ruby 3.0 parser
Browse files Browse the repository at this point in the history
Parser 2.7.1.5 includes whitequark/parser#729 and
this PR updates from `Parser::Ruby28` to `Parser::Ruby30` for Ruby 3.0 parser.
  • Loading branch information
koic committed Sep 24, 2020
1 parent 0c89003 commit d466792
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,10 @@

## master (unreleased)

### Changes

* [#121](https://github.com/rubocop-hq/rubocop-ast/pull/121): Update from `Parser::Ruby28` to `Parser::Ruby30` for Ruby 3.0 parser (experimental). ([@koic][])

## 0.4.2 (2020-09-18)

### Bug fixes
Expand Down
6 changes: 3 additions & 3 deletions lib/rubocop/ast/processed_source.rb
Expand Up @@ -229,9 +229,9 @@ def parser_class(ruby_version)
when 2.7
require 'parser/ruby27'
Parser::Ruby27
when 2.8
require 'parser/ruby28'
Parser::Ruby28
when 2.8, 3.0
require 'parser/ruby30'
Parser::Ruby30
else
raise ArgumentError,
"RuboCop found unknown Ruby version: #{ruby_version.inspect}"
Expand Down
2 changes: 1 addition & 1 deletion rubocop-ast.gemspec
Expand Up @@ -29,7 +29,7 @@ Gem::Specification.new do |s|
'bug_tracker_uri' => 'https://github.com/rubocop-hq/rubocop-ast/issues'
}

s.add_runtime_dependency('parser', '>= 2.7.1.4')
s.add_runtime_dependency('parser', '>= 2.7.1.5')

s.add_development_dependency('bundler', '>= 1.15.0', '< 3.0')

Expand Down

0 comments on commit d466792

Please sign in to comment.