Skip to content

Commit

Permalink
Fix uninitialized constant Parser::AST::Processor::Mixin
Browse files Browse the repository at this point in the history
parser 3.3.1.0 introduced
whitequark/parser#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 inspec#7029

Signed-off-by: Stan Hu <stanhu@gmail.com>
  • Loading branch information
stanhu committed Apr 30, 2024
1 parent f482fd0 commit d2ff553
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/inspec/utils/profile_ast_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
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
Expand Down

0 comments on commit d2ff553

Please sign in to comment.