Skip to content

Conversation

@k0kubun
Copy link
Member

@k0kubun k0kubun commented Sep 23, 2024

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 rubocop/rubocop#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.

<internal:core> core/kernel.rb:282:in `require_relative': /home/runner/.rubies/truffleruby-head/lib/gems/gems/sequel-5.68.0/lib/sequel/dataset/query.rb:90: Invalid return in class/module body (SyntaxError)
	from /home/runner/.rubies/truffleruby-head/lib/gems/gems/sequel-5.68.0/lib/sequel/dataset.rb:47:in `<module:Sequel>'
	from /home/runner/.rubies/truffleruby-head/lib/gems/gems/sequel-5.68.0/lib/sequel/dataset.rb:3:in `<top (required)>'
	from <internal:core> core/kernel.rb:292:in `require_relative'
	from /home/runner/.rubies/truffleruby-head/lib/gems/gems/sequel-5.68.0/lib/sequel/core.rb:429:in `<module:Sequel>'
	from /home/runner/.rubies/truffleruby-head/lib/gems/gems/sequel-5.68.0/lib/sequel/core.rb:27:in `<top (required)>'
	from <internal:core> core/kernel.rb:292:in `require_relative'
	from /home/runner/.rubies/truffleruby-head/lib/gems/gems/sequel-5.68.0/lib/sequel/model.rb:3:in `<top (required)>'
	from <internal:core> core/kernel.rb:292:in `require_relative'
	from /home/runner/.rubies/truffleruby-head/lib/gems/gems/sequel-5.68.0/lib/sequel.rb:3:in `<top (required)>'
	from <internal:core> core/kernel.rb:229:in `gem_original_require'
	from <internal:/home/runner/.rubies/truffleruby-head/lib/mri/rubygems/core_ext/kernel_require.rb>:38:in `require'
	from /home/runner/work/yjit-bench/yjit-bench/benchmarks/sequel/benchmark.rb:7:in `<main>'
@k0kubun
Copy link
Member Author

k0kubun commented Sep 23, 2024

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

@k0kubun k0kubun merged commit 89ce789 into ruby:main Sep 23, 2024
4 checks passed
@k0kubun k0kubun deleted the fix-rubocop branch September 23, 2024 22:57
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 this pull request may close these issues.

1 participant