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

Run tests on Ruby 3.1 #1272

Merged
merged 2 commits into from
Dec 19, 2023
Merged

Run tests on Ruby 3.1 #1272

merged 2 commits into from
Dec 19, 2023

Conversation

colindean
Copy link
Member

Now that Homebrew 4.2.0 runs on Ruby 3.1, let's bump to that.

https://brew.sh/2023/12/18/homebrew-4.2.0/

Now that Homebrew 4.2.0 runs on Ruby 3.1, let's bump to that.

https://brew.sh/2023/12/18/homebrew-4.2.0/
Without this, a test fails because rspec is unable to proxy $CHILD_STATUS/$?. I looked around for another way to handle this but there's no way to unfreeze except through duplication.

```
1) Bundle when the system call fails emits all stdout output even if verbose is false
     Failure/Error: success = st.success?

     ArgumentError:
       Cannot proxy frozen objects, rspec-mocks relies on proxies for method stubbing and expectations.
     # ./lib/bundle/bundle.rb:18:in `block in system'
     # ./lib/bundle/bundle.rb:12:in `popen'
     # ./lib/bundle/bundle.rb:12:in `system'
     # ./spec/bundle_utils_spec.rb:22:in `block (4 levels) in <top (required)>'
     # ./spec/bundle_utils_spec.rb:22:in `block (3 levels) in <top (required)>'
     # ./spec/spec_helper.rb:73:in `block (3 levels) in <top (required)>'
     # ./spec/spec_helper.rb:73:in `block (2 levels) in <top (required)>'
     # ------------------
     # --- Caused by: ---
     # FrozenError:
     #   can't modify frozen object: pid 0 exit 0
     #   ./lib/bundle/bundle.rb:18:in `block in system'
```
@colindean
Copy link
Member Author

I have no idea if what I've done in fe11409 is rational but it solves the test failure resulting from rspec being unable to proxy CHILD_STATUS since it's frozen.

@MikeMcQuaid
Copy link
Member

Thanks both!

@MikeMcQuaid MikeMcQuaid merged commit e4798d8 into Homebrew:master Dec 19, 2023
4 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants