Shopify / yjit-bench

Set of benchmarks for the YJIT CRuby JIT compiler and other Ruby implementations.
MIT License
87 stars 22 forks source link

Fix a StringIO failure on rubocop #331

Closed k0kubun closed 1 week ago

k0kubun commented 1 week ago

I don't know what triggered this, but with the current Ruby master, rubocop fails to look up the StringIO constant:

/opt/rubies/after/lib/ruby/gems/3.4.0+0/gems/rubocop-1.60.1/lib/rubocop/cop/correctors/alignment_corrector.rb:101:in 'RuboCop::Cop::AlignmentCorrector.remove': uninitialized constant #<Class:RuboCop::Cop::AlignmentCorrector>::StringIO (NameError)

          $stderr = StringIO.new # Avoid error messages on console
                    ^^^^^^^^

They seem to have fixed this by requiring stringio https://github.com/rubocop/rubocop/pull/13234 (Note: This happens with --parser=parse.y as well, so it has nothing to do with Prism), so this PR follows it. We should be able to remove this once they publish the fix to rubygems.org.

k0kubun commented 1 week ago

Merging to fix the CI of the other PR of mine.