Add Ruby 4.0.0 support and fixing failing tests #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds compatibility for Ruby 4.0.0 by addressing breaking changes in the Ruby runtime.
Changes
Thread variable access for Bullet notification collector
Ruby 4.0 / Bullet now uses
thread_variable_get/setinstead of hash-style accessor for thread-local variables.Backtrace format changes
Ruby 4.0 changed the backtrace format:
'method'instead of`method''ClassName#method_name'instead of'method_name'Updated all regex patterns in
markers.rbto support both formats.Hash#to_s output format
Ruby 4.0 changed
Hash#to_sto use new-style syntax{key: val}instead of{:key=>val}.Added
to_hash_rocket_syntaxhelper method incorrector_builder.rbto ensure consistent output format.RSpec version update
Updated RSpec gems to versions compatible with Ruby 4.0:
rspec~> 3.12rspec-rails~> 6.0Deprecated API fix
Fixed deprecated
config.fixture_pathtoconfig.fixture_pathsinspec/rails_helper.rb.Testing
All 28 examples pass on Ruby 4.0.0.