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

Errors thrown from Layout/BlockAlignment cop when running with ruby-head #10258

Closed
eshanholtz opened this issue Nov 19, 2021 · 9 comments · Fixed by #10632
Closed

Errors thrown from Layout/BlockAlignment cop when running with ruby-head #10258

eshanholtz opened this issue Nov 19, 2021 · 9 comments · Fixed by #10632

Comments

@eshanholtz
Copy link

Our rubocop linter started erroring suddenly yesterday during our daily CRON build when testing against ruby-head via GitHub Actions.


Expected behavior

Expected rubocop to exit with success, like in the last successful build. No changes have been introduced to the codebase since this run.

Actual behavior

ruby-head build failure with debug output enabled. The output has been copied below:

bundle exec rubocop -d --cache true --parallel
The following cops were added to RuboCop, but are not configured. Please set Enabled to either `true` or `false` in your `.rubocop.yml` file:
 - Layout/SpaceAroundMethodCallOperator (0.82)
 - Lint/RaiseException (0.81)
 - Lint/StructNewOverride (0.81)
 - Style/ExponentialNotation (0.82)
For more information: docs.rubocop.org/en/latest/versioning
Running parallel inspection
An error occurred while Layout/BlockAlignment cop was inspecting /home/runner/work/twilio-ruby/twilio-ruby/lib/twilio-ruby/http.rb:3:0.
An error occurred while Layout/BlockAlignment cop was inspecting /home/runner/work/twilio-ruby/twilio-ruby/spec/twilio_spec.rb:1:0.
undefined method `op_asgn_type?' for [s(:block,
  s(:send,
    s(:send,
      s(:send,
        s(:const, nil, :Dir), :[],
        s(:send,
          s(:const, nil, :File), :join,
          s(:send, nil, :__dir__),
          s(:str, "http/**/*.rb"))), :sort), :each),
  s(:args,
    s(:arg, :file)),
  s(:send, nil, :require,
    s(:lvar, :file)))]:Array

          result, = *result while result.op_asgn_type? || result.masgn_type?
                                        ^^^^^^^^^^^^^^
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/layout/block_alignment.rb:108:in `start_for_block_node'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/layout/block_alignment.rb:80:in `on_block'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:57:in `block (2 levels) in trigger_responding_cops'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:136:in `with_cop_error_handling'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:56:in `block in trigger_responding_cops'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:55:in `each'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:55:in `trigger_responding_cops'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:32:in `block (2 levels) in <class:Commissioner>'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/ast/traversal.rb:14:in `walk'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:44:in `investigate'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/team.rb:124:in `investigate'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/team.rb:112:in `offenses'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/team.rb:44:in `inspect_file'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:296:in `inspect_file'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:244:in `block in do_inspection_loop'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:276:in `block in iterate_until_no_changes'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:269:in `loop'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:269:in `iterate_until_no_changes'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:240:in `do_inspection_loop'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:119:in `block in file_offenses'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:143:in `file_offense_cache'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:117:in `file_offenses'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/parallel-1.21.0/lib/parallel.rb:515:in `call_with_index'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/parallel-1.21.0/lib/parallel.rb:485:in `process_incoming_jobs'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/parallel-1.21.0/lib/parallel.rb:465:in `block in worker'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/parallel-1.21.0/lib/parallel.rb:456:in `fork'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/parallel-1.21.0/lib/parallel.rb:456:in `worker'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/parallel-1.21.0/lib/parallel.rb:447:in `block in create_workers'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/parallel-1.21.0/lib/parallel.rb:446:in `each'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/parallel-1.21.0/lib/parallel.rb:446:in `each_with_index'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/parallel-1.21.0/lib/parallel.rb:446:in `create_workers'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/parallel-1.21.0/lib/parallel.rb:386:in `work_in_processes'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/parallel-1.21.0/lib/parallel.rb:289:in `map'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/parallel-1.21.0/lib/parallel.rb:238:in `each'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:59:in `warm_cache'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:38:in `run'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli/command/execute_runner.rb:21:in `execute_runner'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli/command/execute_runner.rb:13:in `run'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli/command.rb:10:in `run'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli/environment.rb:17:in `run'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli.rb:65:in `run_command'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli.rb:72:in `execute_runners'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli.rb:41:in `run'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/exe/rubocop:13:in `block in <top (required)>'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/benchmark.rb:311:in `realtime'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/exe/rubocop:12:in `<top (required)>'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/bin/rubocop:25:in `load'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/bin/rubocop:25:in `<top (required)>'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/cli/exec.rb:58:in `load'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/cli/exec.rb:58:in `kernel_load'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/cli/exec.rb:23:in `run'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/cli.rb:478:in `exec'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/cli.rb:31:in `dispatch'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/cli.rb:25:in `start'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.1.0/gems/bundler-2.3.0.dev/libexec/bundle:49:in `block in <top (required)>'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/friendly_errors.rb:103:in `with_friendly_errors'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.1.0/gems/bundler-2.3.0.dev/libexec/bundle:37:in `<top (required)>'
/home/runner/.rubies/ruby-head/bin/bundle:23:in `load'
/home/runner/.rubies/ruby-head/bin/bundle:23:in `<main>'
undefined method `op_asgn_type?' for [s(:block,
  s(:send, nil, :describe,
    s(:const, nil, :Twilio)),
  s(:args),
  s(:begin,
    s(:block,
      s(:send, nil, :after,
        s(:sym, :each)),
      s(:args),
      s(:send,
        s(:const, nil, :Twilio), :instance_variable_set,
        s(:str, "@configuration"),
        s(:nil))),
    s(:block,
      s(:send, nil, :it,
        s(:str, "should set the configuration with a config block")),
      s(:args),
      s(:begin,
        s(:block,
          s(:send,
            s(:const, nil, :Twilio), :configure),
          s(:args,
            s(:arg, :config)),
          s(:begin,
            s(:send,
              s(:lvar, :config), :account_sid=,
              s(:str, "someSid")),
            s(:send,
              s(:lvar, :config), :auth_token=,
              s(:str, "someToken")),
            s(:send,
              s(:lvar, :config), :http_client=,
              s(:str, "someClient")))),
        s(:send,
          s(:send, nil, :expect,
            s(:send,
              s(:const, nil, :Twilio), :account_sid)), :to,
          s(:send, nil, :eq,
            s(:str, "someSid"))),
        s(:send,
          s(:send, nil, :expect,
            s(:send,
              s(:const, nil, :Twilio), :auth_token)), :to,
          s(:send, nil, :eq,
            s(:str, "someToken"))),
        s(:send,
          s(:send, nil, :expect,
            s(:send,
              s(:const, nil, :Twilio), :http_client)), :to,
          s(:send, nil, :eq,
            s(:str, "someClient")))))))]:Array

          result, = *result while result.op_asgn_type? || result.masgn_type?
                                        ^^^^^^^^^^^^^^
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/layout/block_alignment.rb:108:in `start_for_block_node'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/layout/block_alignment.rb:80:in `on_block'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:57:in `block (2 levels) in trigger_responding_cops'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:136:in `with_cop_error_handling'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:56:in `block in trigger_responding_cops'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:55:in `each'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:55:in `trigger_responding_cops'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:32:in `block (2 levels) in <class:Commissioner>'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/ast/traversal.rb:14:in `walk'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:44:in `investigate'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/team.rb:124:in `investigate'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/team.rb:112:in `offenses'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/team.rb:44:in `inspect_file'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:296:in `inspect_file'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:244:in `block in do_inspection_loop'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:276:in `block in iterate_until_no_changes'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:269:in `loop'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:269:in `iterate_until_no_changes'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:240:in `do_inspection_loop'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:119:in `block in file_offenses'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:143:in `file_offense_cache'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:117:in `file_offenses'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/parallel-1.21.0/lib/parallel.rb:515:in `call_with_index'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/parallel-1.21.0/lib/parallel.rb:485:in `process_incoming_jobs'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/parallel-1.21.0/lib/parallel.rb:465:in `block in worker'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/parallel-1.21.0/lib/parallel.rb:456:in `fork'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/parallel-1.21.0/lib/parallel.rb:456:in `worker'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/parallel-1.21.0/lib/parallel.rb:447:in `block in create_workers'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/parallel-1.21.0/lib/parallel.rb:446:in `each'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/parallel-1.21.0/lib/parallel.rb:446:in `each_with_index'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/parallel-1.21.0/lib/parallel.rb:446:in `create_workers'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/parallel-1.21.0/lib/parallel.rb:386:in `work_in_processes'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/parallel-1.21.0/lib/parallel.rb:289:in `map'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/parallel-1.21.0/lib/parallel.rb:238:in `each'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:59:in `warm_cache'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:38:in `run'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli/command/execute_runner.rb:21:in `execute_runner'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli/command/execute_runner.rb:13:in `run'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli/command.rb:10:in `run'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli/environment.rb:17:in `run'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli.rb:65:in `run_command'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli.rb:72:in `execute_runners'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli.rb:41:in `run'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/exe/rubocop:13:in `block in <top (required)>'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/benchmark.rb:311:in `realtime'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/exe/rubocop:12:in `<top (required)>'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/bin/rubocop:25:in `load'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/bin/rubocop:25:in `<top (required)>'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/cli/exec.rb:58:in `load'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/cli/exec.rb:58:in `kernel_load'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/cli/exec.rb:23:in `run'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/cli.rb:478:in `exec'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/cli.rb:31:in `dispatch'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/cli.rb:25:in `start'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.1.0/gems/bundler-2.3.0.dev/libexec/bundle:49:in `block in <top (required)>'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/friendly_errors.rb:103:in `with_friendly_errors'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.1.0/gems/bundler-2.3.0.dev/libexec/bundle:37:in `<top (required)>'
/home/runner/.rubies/ruby-head/bin/bundle:23:in `load'
/home/runner/.rubies/ruby-head/bin/bundle:23:in `<main>'
An error occurred while Layout/BlockAlignment cop was inspecting /home/runner/work/twilio-ruby/twilio-ruby/lib/twilio-ruby/http.rb:3:0.
Inspecting 47 files
Scanning /home/runner/work/twilio-ruby/twilio-ruby/Gemfile
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/Rakefile
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/examples/examples.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/examples/print_call_log.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/lib/rack/twilio_webhook_authentication.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/lib/twilio-ruby.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/lib/twilio-ruby/framework/request.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/lib/twilio-ruby/framework/response.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/lib/twilio-ruby/framework/rest/domain.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/lib/twilio-ruby/framework/rest/error.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/lib/twilio-ruby/framework/rest/helper.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/lib/twilio-ruby/framework/rest/obsolete_client.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/lib/twilio-ruby/framework/rest/page.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/lib/twilio-ruby/framework/rest/resource.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/lib/twilio-ruby/framework/rest/version.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/lib/twilio-ruby/framework/serialize.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/lib/twilio-ruby/framework/twilio_response.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/lib/twilio-ruby/framework/values.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/lib/twilio-ruby/http.rb
undefined method `op_asgn_type?' for [s(:block,
  s(:send,
    s(:send,
      s(:send,
        s(:const, nil, :Dir), :[],
        s(:send,
          s(:const, nil, :File), :join,
          s(:send, nil, :__dir__),
          s(:str, "http/**/*.rb"))), :sort), :each),
  s(:args,
    s(:arg, :file)),
  s(:send, nil, :require,
    s(:lvar, :file)))]:Array

          result, = *result while result.op_asgn_type? || result.masgn_type?
                                        ^^^^^^^^^^^^^^
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/layout/block_alignment.rb:108:in `start_for_block_node'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/layout/block_alignment.rb:80:in `on_block'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:57:in `block (2 levels) in trigger_responding_cops'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:136:in `with_cop_error_handling'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:56:in `block in trigger_responding_cops'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:55:in `each'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:55:in `trigger_responding_cops'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:32:in `block (2 levels) in <class:Commissioner>'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/ast/traversal.rb:14:in `walk'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:44:in `investigate'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/team.rb:124:in `investigate'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/team.rb:112:in `offenses'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/team.rb:44:in `inspect_file'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:296:in `inspect_file'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:244:in `block in do_inspection_loop'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:276:in `block in iterate_until_no_changes'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:269:in `loop'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:269:in `iterate_until_no_changes'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:240:in `do_inspection_loop'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:119:in `block in file_offenses'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:143:in `file_offense_cache'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:117:in `file_offenses'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:108:in `process_file'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:87:in `block in each_inspected_file'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:86:in `each'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:86:in `reduce'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:86:in `each_inspected_file'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:73:in `inspect_files'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:39:in `run'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli/command/execute_runner.rb:21:in `execute_runner'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli/command/execute_runner.rb:13:in `run'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli/command.rb:10:in `run'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli/environment.rb:17:in `run'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli.rb:65:in `run_command'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli.rb:72:in `execute_runners'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli.rb:41:in `run'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/exe/rubocop:13:in `block in <top (required)>'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/benchmark.rb:311:in `realtime'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/exe/rubocop:12:in `<top (required)>'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/bin/rubocop:25:in `load'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/bin/rubocop:25:in `<top (required)>'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/cli/exec.rb:58:in `load'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/cli/exec.rb:58:in `kernel_load'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/cli/exec.rb:23:in `run'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/cli.rb:478:in `exec'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
An error occurred while Layout/BlockAlignment cop was inspecting /home/runner/work/twilio-ruby/twilio-ruby/spec/twilio_spec.rb:1:0.
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/cli.rb:31:in `dispatch'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/cli.rb:25:in `start'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.1.0/gems/bundler-2.3.0.dev/libexec/bundle:49:in `block in <top (required)>'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/friendly_errors.rb:103:in `with_friendly_errors'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.1.0/gems/bundler-2.3.0.dev/libexec/bundle:37:in `<top (required)>'
/home/runner/.rubies/ruby-head/bin/bundle:23:in `load'
/home/runner/.rubies/ruby-head/bin/bundle:23:in `<main>'
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/lib/twilio-ruby/http/http_client.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/lib/twilio-ruby/jwt/access_token.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/lib/twilio-ruby/jwt/client_capability.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/lib/twilio-ruby/jwt/jwt.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/lib/twilio-ruby/jwt/task_router.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/lib/twilio-ruby/rest.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/lib/twilio-ruby/security/request_validator.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/lib/twilio-ruby/util.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/spec/framework/request_spec.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/spec/framework/serialize_spec.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/spec/framework/version_spec.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/spec/holodeck/holodeck.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/spec/holodeck/hologram.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/spec/http/http_client_spec.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/spec/jwt/access_token_spec.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/spec/jwt/client_capability_spec.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/spec/jwt/task_router_spec.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/spec/rack/twilio_webhook_authentication_spec.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/spec/rest/client_spec.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/spec/security/request_validator_spec.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/spec/spec_helper.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/spec/support/fakeweb.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/spec/twilio_spec.rb
undefined method `op_asgn_type?' for [s(:block,
  s(:send, nil, :describe,
    s(:const, nil, :Twilio)),
  s(:args),
  s(:begin,
    s(:block,
      s(:send, nil, :after,
        s(:sym, :each)),
      s(:args),
      s(:send,
        s(:const, nil, :Twilio), :instance_variable_set,
        s(:str, "@configuration"),
        s(:nil))),
    s(:block,
      s(:send, nil, :it,
        s(:str, "should set the configuration with a config block")),
      s(:args),
      s(:begin,
        s(:block,
          s(:send,
            s(:const, nil, :Twilio), :configure),
          s(:args,
            s(:arg, :config)),
          s(:begin,
            s(:send,
              s(:lvar, :config), :account_sid=,
              s(:str, "someSid")),
            s(:send,
              s(:lvar, :config), :auth_token=,
              s(:str, "someToken")),
            s(:send,
              s(:lvar, :config), :http_client=,
              s(:str, "someClient")))),
        s(:send,
          s(:send, nil, :expect,
            s(:send,
              s(:const, nil, :Twilio), :account_sid)), :to,
          s(:send, nil, :eq,
            s(:str, "someSid"))),
        s(:send,
          s(:send, nil, :expect,
            s(:send,
              s(:const, nil, :Twilio), :auth_token)), :to,
          s(:send, nil, :eq,
            s(:str, "someToken"))),
        s(:send,
          s(:send, nil, :expect,
            s(:send,
              s(:const, nil, :Twilio), :http_client)), :to,
          s(:send, nil, :eq,
            s(:str, "someClient")))))))]:Array

          result, = *result while result.op_asgn_type? || result.masgn_type?
                                        ^^^^^^^^^^^^^^
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/layout/block_alignment.rb:108:in `start_for_block_node'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/layout/block_alignment.rb:80:in `on_block'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:57:in `block (2 levels) in trigger_responding_cops'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:136:in `with_cop_error_handling'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:56:in `block in trigger_responding_cops'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:55:in `each'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:55:in `trigger_responding_cops'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:32:in `block (2 levels) in <class:Commissioner>'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/ast/traversal.rb:14:in `walk'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/commissioner.rb:44:in `investigate'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/team.rb:124:in `investigate'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/team.rb:112:in `offenses'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cop/team.rb:44:in `inspect_file'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:296:in `inspect_file'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:244:in `block in do_inspection_loop'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:276:in `block in iterate_until_no_changes'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:269:in `loop'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:269:in `iterate_until_no_changes'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:240:in `do_inspection_loop'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:119:in `block in file_offenses'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:143:in `file_offense_cache'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:117:in `file_offenses'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:108:in `process_file'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:87:in `block in each_inspected_file'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:86:in `each'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:86:in `reduce'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:86:in `each_inspected_file'

2 errors occurred:
An error occurred while Layout/BlockAlignment cop was inspecting /home/runner/work/twilio-ruby/twilio-ruby/lib/twilio-ruby/http.rb:3:0.
An error occurred while Layout/BlockAlignment cop was inspecting /home/runner/work/twilio-ruby/twilio-ruby/spec/twilio_spec.rb:1:0.
Errors are usually caused by RuboCop bugs.
Please, report your problems to RuboCop's issue tracker.
rubocop-hq/rubocop/issues

Mention the following information in the issue report:
0.82.0 (using Parser 3.0.2.0, running on ruby 3.1.0 x86_64-linux)
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:73:in `inspect_files'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/runner.rb:39:in `run'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli/command/execute_runner.rb:21:in `execute_runner'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli/command/execute_runner.rb:13:in `run'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli/command.rb:10:in `run'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli/environment.rb:17:in `run'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli.rb:65:in `run_command'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli.rb:72:in `execute_runners'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/lib/rubocop/cli.rb:41:in `run'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/exe/rubocop:13:in `block in <top (required)>'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/benchmark.rb:311:in `realtime'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/gems/rubocop-0.82.0/exe/rubocop:12:in `<top (required)>'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/bin/rubocop:25:in `load'
/home/runner/work/twilio-ruby/twilio-ruby/vendor/bundle/ruby/3.1.0/bin/rubocop:25:in `<top (required)>'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/cli/exec.rb:58:in `load'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/cli/exec.rb:58:in `kernel_load'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/cli/exec.rb:23:in `run'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/cli.rb:478:in `exec'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/cli.rb:31:in `dispatch'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/cli.rb:25:in `start'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.1.0/gems/bundler-2.3.0.dev/libexec/bundle:49:in `block in <top (required)>'
/home/runner/.rubies/ruby-head/lib/ruby/3.1.0/bundler/friendly_errors.rb:103:in `with_friendly_errors'
/home/runner/.rubies/ruby-head/lib/ruby/gems/3.1.0/gems/bundler-2.3.0.dev/libexec/bundle:37:in `<top (required)>'
/home/runner/.rubies/ruby-head/bin/bundle:23:in `load'
/home/runner/.rubies/ruby-head/bin/bundle:23:in `<main>'
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/spec/twiml/messaging_response_spec.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/spec/twiml/voice_response_spec.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/spec/util/configuration_spec.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/spec/util/url_encode_spec.rb
.Scanning /home/runner/work/twilio-ruby/twilio-ruby/twilio-ruby.gemspec
.

47 files inspected, no offenses detected
Finished in 3.7823471889999922 seconds

RuboCop version

0.82.0 (using Parser 3.0.2.0, running on ruby 3.1.0 x86_64-linux)
@dvandersluis
Copy link
Member

Can you please add some minimal reproduction code?

@eshanholtz
Copy link
Author

eshanholtz commented Nov 19, 2021

I am unable to repro locally as ruby 3.1.0 is not supported on my operating system (osx), but it would be something like

git clone git@github.com:twilio/twilio-ruby.git
cd twilio-ruby && make install

bundle exec rubocop -d --cache true --parallel

@koic
Copy link
Member

koic commented Nov 20, 2021

This may have encountered Ruby 3.1 incompatibilities.
https://bugs.ruby-lang.org/issues/18268

RuboCop 1.22.3 or newer resolve this issue.
1c9abe9

Can you upgrade to RuboCop 1.22.3 or newer?

@eshanholtz
Copy link
Author

@koic We cannot, as our helper library currently supports Ruby v2.4+

@dvandersluis
Copy link
Member

If this is a CI issue, could you setup a different gemfile for different ruby versions? Keep 2.4 on the older RuboCop version and use a newer version for other versions.

This would be slightly non-trivial because you might end up needing .rubocop.yml changes for different RuboCop versions, but it is doable.

@koic
Copy link
Member

koic commented Nov 26, 2021

Alternatively, you can disable Layout/BlockAlignment cop in .rubocop.yml as a workaround. e.g.:

# Prevents Ruby 3.1 incompatibility error. You can enable this cop when Ruby 2.4 support is dropped.
# See https://github.com/rubocop/rubocop/issues/10258
Layout/BlockAlignment:
  Enabled: false

sue445 added a commit to sue445/faraday-middleware-template that referenced this issue Jan 8, 2022
`undefined method `op_asgn_type?'` error is occured on Ruby 3.1
c.f. rubocop/rubocop#10258 (comment)
@AlexWayfer
Copy link
Contributor

AlexWayfer commented Feb 23, 2022

It's actual with Ruby 3.1 :(

Without Ruby 2.4 support.

sue445 added a commit to sue445/faraday-middleware-template that referenced this issue Feb 24, 2022
`undefined method `op_asgn_type?'` error is occured on Ruby 3.1
c.f. rubocop/rubocop#10258 (comment)
@sambostock
Copy link
Contributor

While backwards compatibility is great, I just want to mention that Ruby 2.4's official end-of-life was nearly 2 years ago, with 2.6's end-of-life coming up this month.

@koic
Copy link
Member

koic commented May 13, 2022

The runtime Ruby version and analysis Ruby version code are different. For example, RuboCop should be able to analysis Ruby 2.4 code using Ruby 3.1 runtime. I've opened #10632.

koic added a commit to koic/rubocop that referenced this issue May 13, 2022
…ersion: 2.4`

Fixes rubocop#10258 and reverts part of rubocop#9648.

Only the Ruby version (2.4) to runtime should have been dropped,
not code analysis.
This PR makes Ruby 2.4 code analysis with `TargetRubyVersion: 2.4`.
So, this keeps it compatible with `TargetRubyVersion` up to
RuboCop 1.12.1 as semver.

It aims to solve essentially the same problem as rubocop#10626.
bbatsov pushed a commit that referenced this issue May 13, 2022
… 2.4`

Fixes #10258 and reverts part of #9648.

Only the Ruby version (2.4) to runtime should have been dropped,
not code analysis.
This PR makes Ruby 2.4 code analysis with `TargetRubyVersion: 2.4`.
So, this keeps it compatible with `TargetRubyVersion` up to
RuboCop 1.12.1 as semver.

It aims to solve essentially the same problem as #10626.
smudge pushed a commit to Betterment/test_track_rails_client that referenced this issue Mar 6, 2023
The specified Rubocop version was quite old. Running the specs against Ruby 3.1 isn't possible without upgrading due to [this issue](rubocop/rubocop#10258).
tetsuya added a commit to tetsuya/sinatra-hello-world that referenced this issue Mar 23, 2023
Running Rubocop < 1.22.3 on Ruby v3.1 generates
`An error occurred while Layout/BlockAlignment cop was inspecting` error.
This fixes the error by bumping standard to the latest version which
also updates Rubocop version, as suggested in rubocop/rubocop#10258
rli9 added a commit to intel/lkp-tests that referenced this issue May 27, 2023
When running rubocop 1.12.1 with ruby 3.2.2, it appears below error

    An error occurred while Layout/BlockAlignment cop was inspecting /lkp/lkp-tests/stats/proc-vmstat:3:0.
    undefined method `op_asgn_type?' for [s(:block,
      s(:send,
        s(:gvar, :$stdin), :each_line),
      s(:args,
        s(:arg, :line)),

This requires to have higher version of rubocop.

Link: rubocop/rubocop#10258
Signed-off-by: Philip Li <philip.li@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants