Fix uninitialized constant Parser::AST::Processor::Mixin (#7030)

parser 3.3.1.0 introduced
https://github.com/whitequark/parser/pull/1000, which causes this
failure:

```
% bundle exec ruby -Itest test/unit/profiles/profile_test.rb
inspec/lib/inspec/utils/profile_ast_helpers.rb:7:in `<class:CollectorBase>': uninitialized constant Parser::AST::Processor::Mixin (NameError)

        include Parser::AST::Processor::Mixin
                                      ^^^^^^^
```

Fix this by inherting from `Parser::AST::Processor` instead.

Closes #7029

Signed-off-by: Stan Hu <stanhu@gmail.com>
This commit is contained in:
Stan Hu 2024-05-02 01:46:33 -07:00 committed by GitHub
parent 3478886b56
commit c9bb58e908
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,8 +3,7 @@ require "rubocop-ast"
module Inspec
class Profile
class AstHelper
class CollectorBase
include Parser::AST::Processor::Mixin
class CollectorBase < Parser::AST::Processor
include RuboCop::AST::Traversal
attr_reader :memo