Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit a workaround to prevent the following JRuby error. ```console % ruby -v jruby 9.2.14.0 (2.5.7) 2020-12-08 ebe64bafb9 Java HotSpot(TM) 64-Bit Server VM 25.271-b09 on 1.8.0_271-b09 +jit [darwin-x86_64] % bundle exec rake ascii_spec (snip) Failures: 1) RuboCop::CLI --show-cops with no args prints all cops in their right department listing Failure/Error: lines.slice_before(/Department /).each do |slice| departments = registry.departments.map(&:to_s) current = departments.delete(slice.shift[/Department '(?<c>[^']+)'/, 'c']) # all cops in their department listing registry.with_department(current).each do |cop| expect(slice.any? { |l| l.include? cop.cop_name }).to be_truthy end ArgumentError: invalid byte sequence in US-ASCII # uri:classloader:/jruby/kernel/enumerable.rb:17:in `block in slice_before' # uri:classloader:/jruby/kernel/enumerable.rb:9:in `block in slice_before' # ./spec/rubocop/cli/cli_options_spec.rb:1136:in `block in <main>' # ./spec/support/cli_spec_behavior.rb:27:in `block in /Users/koic/src/github.com/rubocop-hq/rubocop/spec/support/cli_spec_behavior.rb' # ./lib/rubocop/rspec/shared_contexts.rb:31:in `block in /Users/koic/src/github.com/rubocop-hq/rubocop/lib/rubocop/rspec/shared_contexts.rb' # ./lib/rubocop/rspec/shared_contexts.rb:30:in `block in /Users/koic/src/github.com/rubocop-hq/rubocop/lib/rubocop/rspec/shared_contexts.rb' # ./lib/rubocop/rspec/shared_contexts.rb:7:in `block in /Users/koic/src/github.com/rubocop-hq/rubocop/lib/rubocop/rspec/shared_contexts.rb' Finished in 3 minutes 1.3 seconds (files took 7.47 seconds to load) 114 examples, 1 failure Failed examples: rspec ./spec/rubocop/cli/cli_options_spec.rb:1134 # RuboCop::CLI --show-cops with no args prints all cops in their right department listing ``` https://app.circleci.com/pipelines/github/rubocop-hq/rubocop/3729/workflows/d5c1759d-0727-4db1-82ff-4413e446ed87/jobs/166685 See: jruby/jruby#6528
- Loading branch information